Skip to content

Commit

Permalink
fix: Extra tests
Browse files Browse the repository at this point in the history
  • Loading branch information
can-keklik committed Dec 13, 2024
1 parent 39d682a commit 2265529
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion lykiadb-server/tests/interpreter/expr
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,36 @@ test_utils::out("5" between 1 and 10);

Interpret(Other { message: "Range can only be created with numbers. Str(\"1\") Num(10.0) Num(5.0)" })
Interpret(Other { message: "Range can only be created with numbers. Num(1.0) Str(\"10\") Num(5.0)" })
Interpret(Other { message: "Range can only be created with numbers. Num(1.0) Num(10.0) Str(\"5\")" })
Interpret(Other { message: "Range can only be created with numbers. Num(1.0) Num(10.0) Str(\"5\")" })

#[name=obj_assignment, run=interpreter]>

var $object = {};
$object.test = 1;

test_utils::out($object.test == 1);

---

true

#[name=obj_assignment, run=interpreter]>

var $object = {};
$object.level_one = {};
$object.level_one.level_two = {};
$object.level_one.level_two.level_three = {};

$object.level_one.title = "1";
$object.level_one.level_two.title = "2";
$object.level_one.level_two.level_three.title = "3";

test_utils::out($object.level_one.title);
test_utils::out($object.level_one.level_two.title);
test_utils::out($object.level_one.level_two.level_three.title);

---

1
2
3

0 comments on commit 2265529

Please sign in to comment.