We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca05177 commit 3dd69bbCopy full SHA for 3dd69bb
test/unit/fs/vfs_test.cpp
@@ -27,6 +27,7 @@ class Person {
27
public:
28
explicit Person(std::string name, int age) : name_ {name}, age_ {age} {};
29
bool isBjarne() const { return (name_ == "Bjarne") ? true : false; }
30
+ bool isAdult() const { return (age_ >= 18) ? true : false; }
31
private:
32
std::string name_;
33
int age_;
@@ -75,7 +76,9 @@ CASE("VFS entries can contain arbitrary objects")
75
76
EXPECT(info == "Person");
77
Person bjarne = e.obj<Person>();
78
EXPECT(bjarne.isBjarne() == true);
79
+ EXPECT(bjarne.isAdult() == true);
80
EXPECT_THROWS(e.obj<std::string>());
81
+
82
// constness is checked
83
const Person q {"Dennis", 70};
84
fs::VFS_entry f(q, "inspiration", "duh^2");
0 commit comments