From 226552925896a2d8be2718d8567619a08e199057 Mon Sep 17 00:00:00 2001 From: Vedat Can Keklik Date: Fri, 13 Dec 2024 11:40:39 +0300 Subject: [PATCH] fix: Extra tests --- lykiadb-server/tests/interpreter/expr | 34 ++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/lykiadb-server/tests/interpreter/expr b/lykiadb-server/tests/interpreter/expr index 1db7e559..ee664f8c 100644 --- a/lykiadb-server/tests/interpreter/expr +++ b/lykiadb-server/tests/interpreter/expr @@ -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\")" }) \ No newline at end of file +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 \ No newline at end of file