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 --- test/CMakeLists.txt | 6 +++--- test/foobar.cpp | 21 --------------------- test/symbols.cpp | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 test/foobar.cpp create mode 100644 test/symbols.cpp (limited to 'test') 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