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
2 changes: 2 additions & 0 deletions tests/std/tests/Dev09_172666_tr1_tuple_odr/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
23 changes: 23 additions & 0 deletions tests/std/tests/Dev09_172666_tr1_tuple_odr/custom_format.py
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 10 additions & 0 deletions tests/std/tests/Dev09_172666_tr1_tuple_odr/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
2 changes: 2 additions & 0 deletions tests/std/tests/VSO_0000000_matching_npos_address/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
23 changes: 23 additions & 0 deletions tests/std/tests/VSO_0000000_matching_npos_address/custom_format.py
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 10 additions & 0 deletions tests/std/tests/VSO_0000000_matching_npos_address/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -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)