瀏覽代碼

* Fixed compiler error in gcc

master
bergmann 6 年之前
父節點
當前提交
a655de0390
共有 2 個檔案被更改,包括 5 行新增5 行删除
  1. +2
    -2
      test/cppmp/cppmp_getter_tests.cpp
  2. +3
    -3
      test/cppmp/cppmp_setter_tests.cpp

+ 2
- 2
test/cppmp/cppmp_getter_tests.cpp 查看文件

@@ -57,11 +57,11 @@ TEST(cppmp_getter_tests, static_func)


TEST(cppmp_getter_tests, lambda) TEST(cppmp_getter_tests, lambda)
{ {
test_obj o { 1 };
test_obj obj { 1 };


auto g = make_getter([](test_obj& o){ auto g = make_getter([](test_obj& o){
return o.value; return o.value;
}); });


EXPECT_EQ(1, g(o));
EXPECT_EQ(1, g(obj));
} }

+ 3
- 3
test/cppmp/cppmp_setter_tests.cpp 查看文件

@@ -61,12 +61,12 @@ TEST(cppmp_setter_tests, static_func)


TEST(cppmp_setter_tests, lambda) TEST(cppmp_setter_tests, lambda)
{ {
test_obj o { 1 };
test_obj obj { 1 };


auto s = make_setter([](test_obj& o, int v){ auto s = make_setter([](test_obj& o, int v){
o.value = v; o.value = v;
}); });
s(o, 1);
s(obj, 1);


EXPECT_EQ(1, o.value);
EXPECT_EQ(1, obj.value);
} }

Loading…
取消
儲存