Added example of assignment to already created object.

This commit is contained in:
James Goppert
2016-05-09 11:12:06 -04:00
parent 65679fbcbb
commit bd8420fcf6
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ sudo: false
install:
- pip install --user cpp-coveralls
script:
- cmake -DCMAKE_BUILD_TYPE=Profile -DTEST=ON -DFORMAT=ON .
- cmake -DCMAKE_BUILD_TYPE=Profile -DTESTING=ON -DFORMAT=ON .
- make
- make check_format
- ctest -V
+2 -2
View File
@@ -16,7 +16,7 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
option(SUPPORT_STDIOSTREAM
"If enabled provides support for << operator (as used with
std::cout)" OFF)
option(TEST "Enable testing" OFF)
option(TESTING "Enable testing" OFF)
option(FORMAT "Enable formatting" OFF)
if(SUPPORT_STDIOSTREAM)
@@ -62,7 +62,7 @@ include_directories(${CMAKE_SOURCE_DIR})
file(GLOB_RECURSE COV_SRCS matrix/*.hpp matrix/*.cpp)
if(TEST)
if(TESTING)
enable_testing()
add_subdirectory(test)
endif()
+2 -1
View File
@@ -130,7 +130,8 @@ int main()
Eulerf eulerf(float(deg2rad)*float(roll),
float(deg2rad)*float(pitch),
float(deg2rad)*float(yaw));
Dcm<float> dcm_from_eulerf(eulerf);
Dcm<float> dcm_from_eulerf;
dcm_from_eulerf = eulerf;
Euler<float> euler_outf(dcm_from_eulerf);
TEST(isEqual(float(rad2deg)*eulerf_expected,
float(rad2deg)*euler_outf));