Skip to content

Commit

Permalink
tests: add dynamic special test
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Feb 15, 2024
1 parent bb85de0 commit 61507d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/parse/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ int main(int argc, char** argv, char** envp) {
EXPECT(config.parseDynamic("testCategory:testValueHex", "0xaabbccdd").error, false);
EXPECT(std::any_cast<int64_t>(config.getConfigValue("testCategory:testValueHex")), (Hyprlang::INT)0xAABBCCDD);

// test dynamic special
config.addSpecialConfigValue("specialGeneric:one", "boom", (Hyprlang::INT)0);
EXPECT(config.parseDynamic("specialGeneric:one:boom = 1").error, false);
EXPECT(std::any_cast<int64_t>(config.getSpecialConfigValue("specialGeneric:one", "boom")), (Hyprlang::INT)1);

// test variables
std::cout << " → Testing variables\n";
EXPECT(std::any_cast<int64_t>(config.getConfigValue("testVar")), 13371337);
Expand Down

0 comments on commit 61507d1

Please sign in to comment.