mirror of
https://github.com/hyprwm/hyprlang.git
synced 2024-12-22 18:09:49 +01:00
tests: add dynamic special test
This commit is contained in:
parent
bb85de0919
commit
61507d1b87
1 changed files with 5 additions and 0 deletions
|
@ -163,6 +163,11 @@ int main(int argc, char** argv, char** envp) {
|
||||||
EXPECT(config.parseDynamic("testCategory:testValueHex", "0xaabbccdd").error, false);
|
EXPECT(config.parseDynamic("testCategory:testValueHex", "0xaabbccdd").error, false);
|
||||||
EXPECT(std::any_cast<int64_t>(config.getConfigValue("testCategory:testValueHex")), (Hyprlang::INT)0xAABBCCDD);
|
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
|
// test variables
|
||||||
std::cout << " → Testing variables\n";
|
std::cout << " → Testing variables\n";
|
||||||
EXPECT(std::any_cast<int64_t>(config.getConfigValue("testVar")), 13371337);
|
EXPECT(std::any_cast<int64_t>(config.getConfigValue("testVar")), 13371337);
|
||||||
|
|
Loading…
Reference in a new issue