From 98c422ed7f3d3ce343c5cb8157b91d5137d38647 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 16 Mar 2020 17:21:57 +0300 Subject: test: foobar -> symbols --- .appveyor.yml | 6 +++--- test/CMakeLists.txt | 6 +++--- test/foobar.cpp | 21 --------------------- test/symbols.cpp | 21 +++++++++++++++++++++ 4 files changed, 27 insertions(+), 27 deletions(-) delete mode 100644 test/foobar.cpp create mode 100644 test/symbols.cpp diff --git a/.appveyor.yml b/.appveyor.yml index 1615d2b..f07fecf 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -36,9 +36,9 @@ after_build: - appveyor.exe PushArtifact "%APPVEYOR_PROJECT_NAME%-%PLATFORM%-%CONFIGURATION%.zip" test_script: - - '"%install_dir%\bin\enum_symbols" --pdb "%install_dir%\bin\foobar.pdb"' - - '"%install_dir%\bin\enum_symbols" --pdb "%install_dir%\bin\foobar.pdb" --mask "foobar!foobar_ns*"' - - '"%install_dir%\bin\enum_symbols" --pdb "%install_dir%\bin\foobar.pdb" --functions --mask "foobar_ns*"' + - '"%install_dir%\bin\enum_symbols" --pdb "%install_dir%\bin\symbols.pdb"' + - '"%install_dir%\bin\enum_symbols" --pdb "%install_dir%\bin\symbols.pdb" --mask "foobar!foobar_ns*"' + - '"%install_dir%\bin\enum_symbols" --pdb "%install_dir%\bin\symbols.pdb" --functions --mask "foobar_ns*"' - '"%install_dir%\bin\call_stack"' diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 656caa9..4574211 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -8,9 +8,9 @@ endif() set(CC_STATIC_RUNTIME OFF) # Reduce the number of symbols in this test utility -add_executable(foobar foobar.cpp) +add_executable(symbols symbols.cpp) -install(TARGETS foobar RUNTIME DESTINATION bin) +install(TARGETS symbols RUNTIME DESTINATION bin) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - install(FILES "$" DESTINATION bin OPTIONAL) + install(FILES "$" DESTINATION bin OPTIONAL) endif() diff --git a/test/foobar.cpp b/test/foobar.cpp deleted file mode 100644 index 7ace3bb..0000000 --- a/test/foobar.cpp +++ /dev/null @@ -1,21 +0,0 @@ -namespace foobar_ns { - -int exit_code = 1; - -int __declspec(noinline) baz() { - return exit_code; -} - -int __declspec(noinline) bar() { - return baz() * 2; -} - -int __declspec(noinline) foo() { - return bar() * 2; -} - -} // namespace foobar_ns - -int main() { - return foobar_ns::foo() * 2; -} diff --git a/test/symbols.cpp b/test/symbols.cpp new file mode 100644 index 0000000..7ace3bb --- /dev/null +++ b/test/symbols.cpp @@ -0,0 +1,21 @@ +namespace foobar_ns { + +int exit_code = 1; + +int __declspec(noinline) baz() { + return exit_code; +} + +int __declspec(noinline) bar() { + return baz() * 2; +} + +int __declspec(noinline) foo() { + return bar() * 2; +} + +} // namespace foobar_ns + +int main() { + return foobar_ns::foo() * 2; +} -- cgit v1.2.3