diff --git a/tests/std/tests/Dev09_172666_tr1_tuple_odr/__init__.py b/tests/std/tests/Dev09_172666_tr1_tuple_odr/__init__.py new file mode 100644 index 00000000000..2ac2a854cb0 --- /dev/null +++ b/tests/std/tests/Dev09_172666_tr1_tuple_odr/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/tests/std/tests/Dev09_172666_tr1_tuple_odr/custom_format.py b/tests/std/tests/Dev09_172666_tr1_tuple_odr/custom_format.py new file mode 100644 index 00000000000..323790ec7cb --- /dev/null +++ b/tests/std/tests/Dev09_172666_tr1_tuple_odr/custom_format.py @@ -0,0 +1,23 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +from pathlib import Path + +from stl.test.format import STLTestFormat, TestStep + + +class CustomTestFormat(STLTestFormat): + def getBuildSteps(self, test, lit_config, shared): + shared.exec_dir = test.getExecDir() + exe_source = Path(test.getSourcePath()) + test2_source = exe_source.parent / 'test2.cpp' + output_base = test.getOutputBaseName() + output_dir = test.getOutputDir() + + cmd, out_files, shared.exec_file = \ + test.cxx.executeBasedOnFlagsCmd([exe_source, test2_source], + output_dir, shared.exec_dir, + output_base, [], [], []) + + yield TestStep(cmd, shared.exec_dir, [exe_source, test2_source], + test.cxx.compile_env) diff --git a/tests/std/tests/Dev09_172666_tr1_tuple_odr/lit.local.cfg b/tests/std/tests/Dev09_172666_tr1_tuple_odr/lit.local.cfg new file mode 100644 index 00000000000..4c325b48119 --- /dev/null +++ b/tests/std/tests/Dev09_172666_tr1_tuple_odr/lit.local.cfg @@ -0,0 +1,10 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +import Dev09_172666_tr1_tuple_odr.custom_format + +config.test_format = \ + Dev09_172666_tr1_tuple_odr.custom_format.CustomTestFormat(config.test_format.cxx, + config.test_format.execute_external, + config.test_format.build_executor, + config.test_format.test_executor) diff --git a/tests/std/tests/Dev09_172666_tr1_tuple_odr/one.cpp b/tests/std/tests/Dev09_172666_tr1_tuple_odr/test.cpp similarity index 70% rename from tests/std/tests/Dev09_172666_tr1_tuple_odr/one.cpp rename to tests/std/tests/Dev09_172666_tr1_tuple_odr/test.cpp index 05cd4dc827d..5f18f8dedea 100644 --- a/tests/std/tests/Dev09_172666_tr1_tuple_odr/one.cpp +++ b/tests/std/tests/Dev09_172666_tr1_tuple_odr/test.cpp @@ -15,11 +15,12 @@ inline bool test_wchar_t_minus() { // LNK2031: calling convention missing in metadata errors, which are irrelevant here. #if defined(_M_CEE_PURE) && !defined(_NATIVE_WCHAR_T_DEFINED) return true; -#else - return fs::file_size(fs::current_path() / "two.cpp") != 0u; -#endif +#else // ^^^ /clr:pure /Zc:wchar_t- / Other vvv + return fs::file_size(fs::current_path() / "Dev09_172666_tr1_tuple_odr.exe") != 0u; +#endif // defined(_M_CEE_PURE) && !defined(_NATIVE_WCHAR_T_DEFINED) } int main() { - assert(meow() == 1729 && test_wchar_t_minus()); + assert(meow() == 1729); + assert(test_wchar_t_minus()); } diff --git a/tests/std/tests/Dev09_172666_tr1_tuple_odr/two.cpp b/tests/std/tests/Dev09_172666_tr1_tuple_odr/test2.cpp similarity index 100% rename from tests/std/tests/Dev09_172666_tr1_tuple_odr/two.cpp rename to tests/std/tests/Dev09_172666_tr1_tuple_odr/test2.cpp diff --git a/tests/std/tests/VSO_0000000_matching_npos_address/__init__.py b/tests/std/tests/VSO_0000000_matching_npos_address/__init__.py new file mode 100644 index 00000000000..2ac2a854cb0 --- /dev/null +++ b/tests/std/tests/VSO_0000000_matching_npos_address/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/tests/std/tests/VSO_0000000_matching_npos_address/custom_format.py b/tests/std/tests/VSO_0000000_matching_npos_address/custom_format.py new file mode 100644 index 00000000000..323790ec7cb --- /dev/null +++ b/tests/std/tests/VSO_0000000_matching_npos_address/custom_format.py @@ -0,0 +1,23 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +from pathlib import Path + +from stl.test.format import STLTestFormat, TestStep + + +class CustomTestFormat(STLTestFormat): + def getBuildSteps(self, test, lit_config, shared): + shared.exec_dir = test.getExecDir() + exe_source = Path(test.getSourcePath()) + test2_source = exe_source.parent / 'test2.cpp' + output_base = test.getOutputBaseName() + output_dir = test.getOutputDir() + + cmd, out_files, shared.exec_file = \ + test.cxx.executeBasedOnFlagsCmd([exe_source, test2_source], + output_dir, shared.exec_dir, + output_base, [], [], []) + + yield TestStep(cmd, shared.exec_dir, [exe_source, test2_source], + test.cxx.compile_env) diff --git a/tests/std/tests/VSO_0000000_matching_npos_address/lit.local.cfg b/tests/std/tests/VSO_0000000_matching_npos_address/lit.local.cfg new file mode 100644 index 00000000000..994f1aefbc5 --- /dev/null +++ b/tests/std/tests/VSO_0000000_matching_npos_address/lit.local.cfg @@ -0,0 +1,10 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +import VSO_0000000_matching_npos_address.custom_format + +config.test_format = \ + VSO_0000000_matching_npos_address.custom_format.CustomTestFormat(config.test_format.cxx, + config.test_format.execute_external, + config.test_format.build_executor, + config.test_format.test_executor) diff --git a/tests/std/tests/VSO_0000000_matching_npos_address/main.cpp b/tests/std/tests/VSO_0000000_matching_npos_address/test.cpp similarity index 100% rename from tests/std/tests/VSO_0000000_matching_npos_address/main.cpp rename to tests/std/tests/VSO_0000000_matching_npos_address/test.cpp diff --git a/tests/std/tests/VSO_0000000_matching_npos_address/a.cpp b/tests/std/tests/VSO_0000000_matching_npos_address/test2.cpp similarity index 100% rename from tests/std/tests/VSO_0000000_matching_npos_address/a.cpp rename to tests/std/tests/VSO_0000000_matching_npos_address/test2.cpp