@@ -636,6 +636,51 @@ async def test_stringify_function(self):
636636 assert len (results ) == 1
637637 assert results [0 ] == {"stringify" : '{\n "a": 1,\n "b": 2\n }' }
638638
639+ @pytest .mark .asyncio
640+ async def test_to_string_function_with_number (self ):
641+ """Test toString function with a number."""
642+ runner = Runner ("RETURN toString(42) as result" )
643+ await runner .run ()
644+ results = runner .results
645+ assert len (results ) == 1
646+ assert results [0 ] == {"result" : "42" }
647+
648+ @pytest .mark .asyncio
649+ async def test_to_string_function_with_boolean (self ):
650+ """Test toString function with a boolean."""
651+ runner = Runner ("RETURN toString(true) as result" )
652+ await runner .run ()
653+ results = runner .results
654+ assert len (results ) == 1
655+ assert results [0 ] == {"result" : "true" }
656+
657+ @pytest .mark .asyncio
658+ async def test_to_string_function_with_object (self ):
659+ """Test toString function with an object."""
660+ runner = Runner ("RETURN toString({a: 1}) as result" )
661+ await runner .run ()
662+ results = runner .results
663+ assert len (results ) == 1
664+ assert results [0 ] == {"result" : '{"a": 1}' }
665+
666+ @pytest .mark .asyncio
667+ async def test_to_lower_function (self ):
668+ """Test toLower function."""
669+ runner = Runner ('RETURN toLower("Hello World") as result' )
670+ await runner .run ()
671+ results = runner .results
672+ assert len (results ) == 1
673+ assert results [0 ] == {"result" : "hello world" }
674+
675+ @pytest .mark .asyncio
676+ async def test_to_lower_function_with_all_uppercase (self ):
677+ """Test toLower function with all uppercase."""
678+ runner = Runner ('RETURN toLower("FOO BAR") as result' )
679+ await runner .run ()
680+ results = runner .results
681+ assert len (results ) == 1
682+ assert results [0 ] == {"result" : "foo bar" }
683+
639684 @pytest .mark .asyncio
640685 async def test_associative_array_with_key_which_is_keyword (self ):
641686 """Test associative array with key which is keyword."""
0 commit comments