summaryrefslogtreecommitdiff
path: root/utils/logval_test.cc
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-21 02:38:55 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-21 02:38:55 +0000
commit524e40dc9ccd03aa8d8115a606b75a25228bb8d5 (patch)
tree4fea4a93696278bebf6124f080c1bff8861b8c95 /utils/logval_test.cc
parentbb480adcc7177a76e2f3d2e1c428fa729ce067d3 (diff)
semiring
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@608 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'utils/logval_test.cc')
-rw-r--r--utils/logval_test.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/logval_test.cc b/utils/logval_test.cc
index 1a23177d..4aa452f2 100644
--- a/utils/logval_test.cc
+++ b/utils/logval_test.cc
@@ -26,13 +26,19 @@ TEST_F(LogValTest,Order) {
EXPECT_FALSE(a < a);
}
-TEST_F(LogValTest,Invert) {
+TEST_F(LogValTest,Negate) {
LogVal<double> x(-2.4);
LogVal<double> y(2.4);
- y.invert();
+ y.negate();
EXPECT_FLOAT_EQ(x,y);
}
+TEST_F(LogValTest,Inverse) {
+ LogVal<double> x(1/2.4);
+ LogVal<double> y(2.4);
+ EXPECT_FLOAT_EQ(x,y.inverse());
+}
+
TEST_F(LogValTest,Minus) {
LogVal<double> x(12);
LogVal<double> y(2);