Skip to content

Commit

Permalink
test(config): better describe behavior in resolving circular dependen…
Browse files Browse the repository at this point in the history
…cies
  • Loading branch information
lotem committed Sep 21, 2017
1 parent 2e52d54 commit b685d40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data/test/config_circular_dependency_test.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
test:
__include: sometimes?
__patch: sometimes?
home: excited
work:
__include: /test/home

sometimes:
work: naive
home: naive
5 changes: 4 additions & 1 deletion test/config_compiler_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,11 @@ class RimeConfigCircularDependencyTest : public RimeConfigCompilerTestBase {

TEST_F(RimeConfigCircularDependencyTest, BestEffortResolution) {
const string& prefix = "test/";
EXPECT_TRUE(config_->IsNull(prefix + "__include"));
EXPECT_TRUE(config_->IsNull(prefix + "__patch"));
EXPECT_TRUE(config_->IsNull(prefix + "work/__include"));
string home;
EXPECT_TRUE(config_->GetString(prefix + "home", &home));
EXPECT_EQ("naive", home);
string work;
EXPECT_TRUE(config_->GetString(prefix + "work", &work));
EXPECT_EQ("excited", work);
Expand Down

0 comments on commit b685d40

Please sign in to comment.