Skip to content

Commit 3dd69bb

Browse files
committed
consume private age variable for mock test
1 parent ca05177 commit 3dd69bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/unit/fs/vfs_test.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class Person {
2727
public:
2828
explicit Person(std::string name, int age) : name_ {name}, age_ {age} {};
2929
bool isBjarne() const { return (name_ == "Bjarne") ? true : false; }
30+
bool isAdult() const { return (age_ >= 18) ? true : false; }
3031
private:
3132
std::string name_;
3233
int age_;
@@ -75,7 +76,9 @@ CASE("VFS entries can contain arbitrary objects")
7576
EXPECT(info == "Person");
7677
Person bjarne = e.obj<Person>();
7778
EXPECT(bjarne.isBjarne() == true);
79+
EXPECT(bjarne.isAdult() == true);
7880
EXPECT_THROWS(e.obj<std::string>());
81+
7982
// constness is checked
8083
const Person q {"Dennis", 70};
8184
fs::VFS_entry f(q, "inspiration", "duh^2");

0 commit comments

Comments
 (0)