File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ ROOT_ADD_GTEST(testRootFinder testRootFinder.cxx LIBRARIES ${Libraries})
9696ROOT_ADD_GTEST(testKahan testKahan.cxx LIBRARIES Core MathCore)
9797ROOT_ADD_GTEST(testDelaunay2D testDelaunay2D.cxx LIBRARIES Core MathCore)
9898ROOT_ADD_GTEST(testKNNDensity testKNNDensity.cxx LIBRARIES Core MathCore Hist)
99+ ROOT_ADD_GTEST(test_basic_math test_basic_math.cxx LIBRARIES MathCore)
100+
99101
100102if (clad)
101103 ROOT_ADD_GTEST(CladDerivatorTests CladDerivatorTests.cxx LIBRARIES Core MathCore)
Original file line number Diff line number Diff line change 1+ #include " gtest/gtest.h"
2+ #include " TMath.h" // ROOT math utilities
3+
4+ // Basic tests for a couple of TMath functions
5+ TEST (MathCoreTest, SqrtFunction) {
6+ double val = 9.0 ;
7+ double out = TMath::Sqrt (val);
8+ EXPECT_NEAR (out, 3.0 , 1e-12 );
9+ }
10+
11+ TEST (MathCoreTest, LogFunction) {
12+ double val = 2.71828182845904523536 ; // approx e
13+ double out = TMath::Log (val);
14+ EXPECT_NEAR (out, 1.0 , 1e-12 );
15+ }
You can’t perform that action at this time.
0 commit comments