浏览代码

Extended tests for Integer class

- tested const declaration
Patrick 4 年之前
父节点
当前提交
b188a4f122
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      test/cases/boxing/IntegerTest.cpp

+ 10 - 0
test/cases/boxing/IntegerTest.cpp

@@ -361,4 +361,14 @@ namespace
     ls_std::Integer x {112};
     ASSERT_STREQ("112", x.toString().c_str());
   }
+
+  // additional testing
+
+  TEST_F(IntegerTest, constApproach)
+  {
+    const ls_std::Integer x {3};
+    ASSERT_EQ(3, x);
+
+//     x = 4; // wouldn't work
+  }
 }