Add target compile options
-Wall -Wextra -pedantic-errors -Wconversion -Wsign-conversion
This commit is contained in:
@@ -12,4 +12,6 @@ set(LIBS
|
||||
# tests
|
||||
file(GLOB_RECURSE TEST_SOURCES "*.cpp")
|
||||
add_executable(tests ${TEST_SOURCES})
|
||||
target_link_libraries(tests ${LIBS})
|
||||
target_link_libraries(tests ${LIBS})
|
||||
|
||||
target_compile_options(tests PRIVATE -Wall -Wextra -pedantic-errors -Wconversion -Wsign-conversion)
|
||||
@@ -5,7 +5,7 @@ TEST(StartersTest, calculateStandard)
|
||||
{
|
||||
Starters_c test1(Starters_c::MachineStandard::Standard, 3, 2000, 2000, 2000, 40, 40, 6000, 45000);
|
||||
|
||||
EXPECT_FLOAT_EQ(-31150.0f, test1.calculate());
|
||||
EXPECT_DOUBLE_EQ(-31150.0L, test1.calculate());
|
||||
}
|
||||
|
||||
TEST(StartersTest, calculateLuxe)
|
||||
@@ -13,6 +13,6 @@ TEST(StartersTest, calculateLuxe)
|
||||
Starters_c test1(Starters_c::MachineStandard::Luxe, 1000, 1000, 105, 25, 9000, 25000);
|
||||
Starters_c test2(Starters_c::MachineStandard::Luxe, 1000, 1000, 1000, 105, 25, 9000, 25000);
|
||||
|
||||
EXPECT_FLOAT_EQ(75500.0f, test1.calculate());
|
||||
EXPECT_FLOAT_EQ(76338.0f, test2.calculate());
|
||||
EXPECT_DOUBLE_EQ(75500.0l, test1.calculate());
|
||||
EXPECT_DOUBLE_EQ(76337.5l, test2.calculate());
|
||||
}
|
||||
Reference in New Issue
Block a user