Skip to content

Commit 703cad2

Browse files
elena-volkova-hclGitHub Enterprise
authored andcommitted
RIC-1060: Fix tests and MoreOrLess sample to comply with C++ standard (#83)
* RIC-1060: Fix class_with_template to comply with C++ 14 and earlier * RIC-1060: Specify C++ 17 explicitly for cpp_source_files since it is including filesystem * RIC-1060: Add missing include <vector> to MoreOrLess sample * Minor change description * RIC-1060: Update HelloWord sample to print C++ standard selected for compiler * RIC-1060: Use contains mode for HelloWorld * Revert "RIC-1060: Use contains mode for HelloWorld" This reverts commit 624ec2c5b85e87d634806fdba8931c43e2bad9a5. * Revert "RIC-1060: Update HelloWord sample to print C++ standard selected for compiler" This reverts commit 1d47d7fab04cfad0da71532d285fe22b2fd9efb3.
1 parent d74b5f4 commit 703cad2

5 files changed

Lines changed: 25 additions & 12 deletions

File tree

art-comp-test/art-comp-test.code-workspace

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@
2828
},
2929
{
3030
"path": "tests/capsule_userdefined_constructor"
31-
},
31+
},
3232
{
3333
"path": "tests/capsule_userdefined_destructor"
34-
},
34+
},
3535
{
3636
"path": "tests/capsule_with_abstract_and_purevirtualfunction"
37-
},
37+
},
3838
{
3939
"path": "tests/capsule_with_abstract_keyword"
40-
},
40+
},
4141
{
4242
"path": "tests/capsule_with_purevirtualfunction"
43-
},
43+
},
4444
{
4545
"path": "tests/capsule_trigger_guard"
46-
},
46+
},
4747
{
4848
"path": "tests/choice_and_junction"
4949
},
@@ -64,7 +64,7 @@
6464
},
6565
{
6666
"path": "tests/class_with_template"
67-
},
67+
},
6868
{
6969
"path": "tests/code_snippets"
7070
},
@@ -143,6 +143,12 @@
143143
{
144144
"path": "tests/macro_callsuper_supermethod"
145145
},
146+
{
147+
"path": "tests/message_count"
148+
},
149+
{
150+
"path": "tests/move_function_2"
151+
},
146152
{
147153
"path": "tests/optional_part"
148154
},
@@ -190,7 +196,7 @@
190196
},
191197
{
192198
"path": "tests/tc_include_paths"
193-
},
199+
},
194200
{
195201
"path": "tests/tc_libraryname"
196202
},
@@ -223,18 +229,21 @@
223229
},
224230
{
225231
"path": "tests/trigger_operation_with_parameters"
226-
},
232+
},
227233
{
228234
"path": "tests/trigger_operation_internal"
229235
},
230236
{
231237
"path": "tests/trigger_operation_internal_1"
232-
},
238+
},
233239
{
234240
"path": "tests/type_descriptor_inheritance"
235241
},
236242
{
237243
"path": "tests/typedef_type_descriptor"
244+
},
245+
{
246+
"path": "tests/unwired_port"
238247
}
239248
]
240249
}

art-comp-test/tests/class_with_template/class_with_template.art

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ capsule Top {
7878
instance2.v = 3.14;
7979

8080

81-
TemplateClassWithDefaultTemplateValues instance3;
81+
TemplateClassWithDefaultTemplateValues<> instance3;
8282
ASSERT(instance3.x == 5, "Unexpected value of x");
8383
instance3.var = MyClass();
8484
instance3.v = 25;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
22
group: cpp_code_generation
3+
compiler: c++17
34
---
4-
C++ files in the project folder including all subfolders should be included into the build. Include paths for folders and subfolders with *.h files should be added to generated Makefile, c_cpp_properties.json and compile_commands.json
5+
C++ files in the project folder including all subfolders should be included into the build. Include paths for folders and subfolders with *.h files should be added to generated Makefile, c_cpp_properties.json and compile_commands.json<br/>
6+
This test case requires C++ 17 or later since it is including filesystem

art-comp-test/tests/cpp_source_files/top.tcjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ tc.topCapsule = 'Top';
33
tc.prerequisites = ["../../TestUtils/testlib.tcjs"];
44
tc.targetFolder = 'cpp_source_files_target';
55
tc.commonPreface = '#include "testlib.art.h"';
6+
tc.cppCodeStandard = "C++ 17";

art-samples/MoreOrLess/Top.art

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ capsule Top {
22
[[rt::header_preface]]
33
`
44
#include <string>
5+
#include <vector>
56
`
67
[[rt::impl_preface]]
78
`

0 commit comments

Comments
 (0)