From 348b0a82e87b4a3b8f9f83b9f6600ed9960c338a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 15 Jan 2020 13:05:24 +0300 Subject: lab_rat: decrease total symbol count --- test/CMakeLists.txt | 1 + test/lab_rat.cpp | 21 +++++++++------------ 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0cd4c1a..c910931 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,3 +1,4 @@ +set(CC_STATIC_RUNTIME OFF) add_executable(lab_rat lab_rat.cpp) install(TARGETS lab_rat RUNTIME DESTINATION bin) diff --git a/test/lab_rat.cpp b/test/lab_rat.cpp index ae93c7b..ed204b6 100644 --- a/test/lab_rat.cpp +++ b/test/lab_rat.cpp @@ -1,24 +1,21 @@ -#include - namespace lab_rat { -void baz() { - std::cout << "baz\n"; +int exit_code = 1; + +int baz() { + return exit_code; } -void bar() { - std::cout << "bar\n"; - baz(); +int bar() { + return baz() * 2; } -void foo() { - std::cout << "foo\n"; - bar(); +int foo() { + return bar() * 2; } } // namespace lab_rat int main() { - lab_rat::foo(); - return 0; + return lab_rat::foo() * 2; } -- cgit v1.2.3