Bring vector.h to 100% coverage.
This commit is contained in:
parent
88be5bfe01
commit
1224a57d06
|
@ -14,7 +14,8 @@ if(DEFINED ENV{CMAKE_GCOV})
|
||||||
add_compile_options(-fprofile-arcs -ftest-coverage)
|
add_compile_options(-fprofile-arcs -ftest-coverage)
|
||||||
# Need CMake 3.15+.
|
# Need CMake 3.15+.
|
||||||
add_link_options(-fprofile-arcs -ftest-coverage)
|
add_link_options(-fprofile-arcs -ftest-coverage)
|
||||||
add_custom_target(coverage COMMAND lcov -d . -t wrmath -o wrmath.info -c
|
add_custom_target(coverage COMMAND lcov -d . -t wrmath -o wrmath.info -c -i
|
||||||
|
COMMAND lcov -d . -t wrmath -o wrmath.info -c
|
||||||
COMMAND genhtml -o coverage-report wrmath.info)
|
COMMAND genhtml -o coverage-report wrmath.info)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -27,14 +28,6 @@ file(GLOB_RECURSE ${PROJECT_NAME}_SOURCES src/*.cc)
|
||||||
## BUILD
|
## BUILD
|
||||||
|
|
||||||
add_library(lib${PROJECT_NAME} ${${PROJECT_NAME}_SOURCES})
|
add_library(lib${PROJECT_NAME} ${${PROJECT_NAME}_SOURCES})
|
||||||
# add_library(LIBNAME
|
|
||||||
# SOURCES
|
|
||||||
# )
|
|
||||||
#
|
|
||||||
# add_executable(EXE_NAME MAIN)
|
|
||||||
# target_link_libraries(EXE_NAME LIBNAMES)
|
|
||||||
# add_dependencies(EXE_NAME LIBNAMES)
|
|
||||||
|
|
||||||
|
|
||||||
## INSTALL
|
## INSTALL
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ using namespace std;
|
||||||
using namespace wr;
|
using namespace wr;
|
||||||
|
|
||||||
|
|
||||||
TEST(Vector3Miscellaneous, ExtractionOperator)
|
TEST(Vector3Miscellaneous, ExtractionOperator3d)
|
||||||
{
|
{
|
||||||
geom::Vector3d vec {1.0, 2.0, 3.0};
|
geom::Vector3d vec {1.0, 2.0, 3.0};
|
||||||
stringstream vecBuffer;
|
stringstream vecBuffer;
|
||||||
|
@ -16,6 +16,36 @@ TEST(Vector3Miscellaneous, ExtractionOperator)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST(Vector3Miscellaneous, ExtractionOperator3f)
|
||||||
|
{
|
||||||
|
geom::Vector3f vec {1.0, 2.0, 3.0};
|
||||||
|
stringstream vecBuffer;
|
||||||
|
|
||||||
|
vecBuffer << vec;
|
||||||
|
EXPECT_EQ(vecBuffer.str(), "<1, 2, 3>");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST(Vector3Miscellaneous, ExtractionOperator4d)
|
||||||
|
{
|
||||||
|
geom::Vector4d vec {1.0, 2.0, 3.0, 4.0};
|
||||||
|
stringstream vecBuffer;
|
||||||
|
|
||||||
|
vecBuffer << vec;
|
||||||
|
EXPECT_EQ(vecBuffer.str(), "<1, 2, 3, 4>");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST(Vector3Miscellaneous, ExtractionOperator4f)
|
||||||
|
{
|
||||||
|
geom::Vector4f vec {1.0, 2.0, 3.0, 4.0};
|
||||||
|
stringstream vecBuffer;
|
||||||
|
|
||||||
|
vecBuffer << vec;
|
||||||
|
EXPECT_EQ(vecBuffer.str(), "<1, 2, 3, 4>");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(Vector3Miscellaneous, SetEpsilon)
|
TEST(Vector3Miscellaneous, SetEpsilon)
|
||||||
{
|
{
|
||||||
geom::Vector3f a {1.0, 1.0, 1.0};
|
geom::Vector3f a {1.0, 1.0, 1.0};
|
||||||
|
|
Loading…
Reference in New Issue