diff options
Diffstat (limited to 'ui/base/models/tree_node_model_unittest.cc')
-rw-r--r-- | ui/base/models/tree_node_model_unittest.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/base/models/tree_node_model_unittest.cc b/ui/base/models/tree_node_model_unittest.cc index acee7d0..b6097c3 100644 --- a/ui/base/models/tree_node_model_unittest.cc +++ b/ui/base/models/tree_node_model_unittest.cc @@ -317,4 +317,13 @@ TEST_F(TreeNodeModelTest, BasicOperations) { delete root; } +TEST_F(TreeNodeModelTest, IsRoot) { + TreeNodeWithValue<int> root; + EXPECT_TRUE(root.is_root()); + + TreeNodeWithValue<int>* child1 = new TreeNodeWithValue<int>(1); + root.Add(child1, root.child_count()); + EXPECT_FALSE(child1->is_root()); +} + } // namespace ui |