-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
159 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
bin | ||
subprojects | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "dependencies/catch-adapter"] | ||
path = dependencies/catch-adapter | ||
url = https://github.com/njoy/catch-adapter.git | ||
[submodule "dependencies/dimwits"] | ||
path = dependencies/dimwits | ||
url = https://github.com/njoy/DimensionalAnalysis.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
add_executable( constants.physics.CODATA2014.test CODATA2014.test.cpp ) | ||
target_compile_options( constants.physics.CODATA2014.test PRIVATE ${${PREFIX}_common_flags} | ||
$<$<BOOL:${strict}>:${${PREFIX}_strict_flags}>$<$<CONFIG:DEBUG>: | ||
${${PREFIX}_DEBUG_flags} | ||
$<$<BOOL:${coverage}>:${${PREFIX}_coverage_flags}>> | ||
$<$<CONFIG:RELEASE>: | ||
${${PREFIX}_RELEASE_flags} | ||
$<$<BOOL:${link_time_optimization}>:${${PREFIX}_link_time_optimization_flags}> | ||
$<$<BOOL:${nonportable_optimization}>:${${PREFIX}_nonportable_optimization_flags}>> | ||
|
||
${CXX_appended_flags} ${constants_appended_flags} ) | ||
target_link_libraries( constants.physics.CODATA2014.test PUBLIC constants ) | ||
add_test( NAME constants.physics.CODATA2014 COMMAND constants.physics.CODATA2014.test ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#define CATCH_CONFIG_MAIN | ||
|
||
#include "catch.hpp" | ||
|
||
#include "constants/physics/CODATA2014.hpp" | ||
|
||
using namespace njoy; | ||
using namespace dimwits; | ||
|
||
SCENARIO( "Testing CODATA2014 physical constants and uncertainties" ){ | ||
auto constants = njoy::constants::physics::CODATA2014; | ||
|
||
REQUIRE( 299792458*meter/second == njoy::constants::physics::CODATA2014[constants::physics::speedOfLight] ); | ||
REQUIRE( 299792458*meter/second == constants[constants::physics::c] ); | ||
} |