Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ filegroup(
"//validation/core/integration_test/class_design_implementation/negative_class_missing:case_data",
"//validation/core/integration_test/class_design_implementation/negative_class_missing_with_suggestion:case_data",
"//validation/core/integration_test/class_design_implementation/negative_class_missing_without_suggestion:case_data",
"//validation/core/integration_test/class_design_implementation/negative_duplicate_class_entity_implementation_input:case_data",
"//validation/core/integration_test/class_design_implementation/negative_duplicate_class_entity_input:case_data",
"//validation/core/integration_test/class_design_implementation/negative_entity_type_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_enum_literal_mismatch:case_data",
Expand Down Expand Up @@ -61,6 +62,7 @@ filegroup(
"//validation/core/integration_test/class_design_implementation/positive_method_inheritance_features:case_data",
"//validation/core/integration_test/class_design_implementation/positive_method_template_pack_features:case_data",
"//validation/core/integration_test/class_design_implementation/positive_relationship_features:case_data",
"//validation/core/integration_test/class_design_implementation/positive_shared_implementation_dependency:case_data",
"//validation/core/integration_test/class_design_implementation/positive_unresolved_type_not_int:case_data",
"//validation/core/integration_test/class_design_implementation/positive_variable_features:case_data",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ fn positive_free_function_features() {
assert_case("positive_free_function_features");
}

#[test]
fn positive_shared_implementation_dependency() {
assert_case("positive_shared_implementation_dependency");
}

#[test]
fn positive_method_features() {
assert_case("positive_method_features");
Expand Down Expand Up @@ -152,6 +157,11 @@ fn negative_duplicate_class_entity_input() {
assert_case("negative_duplicate_class_entity_input");
}

#[test]
fn negative_duplicate_class_entity_implementation_input() {
assert_case("negative_duplicate_class_entity_implementation_input");
}

#[test]
fn negative_entity_type_mismatch() {
assert_case("negative_entity_type_mismatch");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("//bazel/rules/rules_score:rules_score.bzl", "unit", "unit_design")
load("//validation/core/integration_test:puml_fixture.bzl", "provider_fbs_fixture_bundle")

unit_design(
name = "unit_design",
static = ["class_diagram.puml"],
visibility = ["//visibility:private"],
)

cc_library(
name = "implementation_one",
srcs = ["implementation_one.cpp"],
)

cc_library(
name = "implementation_two",
srcs = ["implementation_two.cpp"],
)

unit(
name = "unit",
testonly = False,
maturity = "development",
tests = [],
unit_design = [":unit_design"],
visibility = ["//visibility:private"],
implementation = [
":implementation_one",
":implementation_two",
],
)

provider_fbs_fixture_bundle(
name = "fbs",
visibility = ["//visibility:private"],
deps = [
":unit",
":unit_design",
],
)

filegroup(
name = "case_data",
srcs = [
"expected.yaml",
":fbs",
],
visibility = ["//validation/core/integration_test:__subpackages__"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml

class Engine

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
should_pass: false
error_contains: |
[Class] Class "Engine" is defined more than once in the class implementation.
Class : "Engine"
Implementation source file : "validation/core/integration_test/class_design_implementation/negative_duplicate_class_entity_implementation_input/implementation_one.cpp"
Implementation source line : 14
Duplicate source file : "validation/core/integration_test/class_design_implementation/negative_duplicate_class_entity_implementation_input/implementation_two.cpp"
Duplicate source line : 14
Fix : Remove or rename one of the duplicate class "Engine" declarations in the class implementation.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/********************************************************************************
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

class Engine
{
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/********************************************************************************
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

class engine
{
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# *******************************************************************************
should_pass: false
error_contains: |
[Class] Class "Engine" is defined more than once in the class diagram.
[Class] Class "Engine" is defined more than once in the class design.
Class : "Engine"
Design source file : "validation/core/integration_test/class_design_implementation/negative_duplicate_class_entity_input/class_diagram_part1.puml"
Design source line : 18
Duplicate source file : "validation/core/integration_test/class_design_implementation/negative_duplicate_class_entity_input/class_diagram_part2.puml"
Duplicate source line : 18
Fix : Remove or rename one of the duplicate class "Engine" declarations in the class diagram.
Fix : Remove or rename one of the duplicate class "Engine" declarations in the class design.
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("//bazel/rules/rules_score:rules_score.bzl", "unit", "unit_design")
load("//validation/core/integration_test:puml_fixture.bzl", "provider_fbs_fixture_bundle")

unit_design(
name = "unit_design",
static = ["class_diagram.puml"],
visibility = ["//visibility:private"],
)

cc_library(
name = "shared_types",
hdrs = ["shared.h"],
)

cc_library(
name = "implementation_one",
srcs = ["implementation_one.cpp"],
deps = [":shared_types"],
)

cc_library(
name = "implementation_two",
srcs = ["implementation_two.cpp"],
deps = [":shared_types"],
)

unit(
name = "unit",
testonly = False,
maturity = "development",
tests = [],
unit_design = [":unit_design"],
visibility = ["//visibility:private"],
implementation = [
":implementation_one",
":implementation_two",
],
)

provider_fbs_fixture_bundle(
name = "fbs",
visibility = ["//visibility:private"],
deps = [
":unit",
":unit_design",
],
)

filegroup(
name = "case_data",
srcs = [
"expected.yaml",
":fbs",
],
visibility = ["//validation/core/integration_test:__subpackages__"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml

package shared {
class Shared
}

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
should_pass: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/********************************************************************************
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

#include "validation/core/integration_test/class_design_implementation/positive_shared_implementation_dependency/shared.h"

shared::Shared MakeSharedOne()
{
return {};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/********************************************************************************
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

#include "validation/core/integration_test/class_design_implementation/positive_shared_implementation_dependency/shared.h"

shared::Shared MakeSharedTwo()
{
return {};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/********************************************************************************
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

#ifndef VALIDATION_SHARED_IMPLEMENTATION_DEPENDENCY_SHARED_H_
#define VALIDATION_SHARED_IMPLEMENTATION_DEPENDENCY_SHARED_H_

namespace shared
{
class Shared
{
};
}

#endif
Loading
Loading