@@ -477,6 +477,24 @@ TEST_F(LLVMCodeBuilderTest, FunctionCalls)
477477 { Compiler::StaticType::String, Compiler::StaticType::String, Compiler::StaticType::String },
478478 { v, v1, v2 });
479479 m_builder->addTargetFunctionCall (" test_function_1_arg" , Compiler::StaticType::Void, { Compiler::StaticType::String }, { v });
480+
481+ v = m_builder->addConstValue (123 );
482+ v = m_builder->addFunctionCall (" test_const_number" , Compiler::StaticType::Number, { Compiler::StaticType::Number }, { v });
483+ m_builder->addFunctionCall (" test_print_number" , Compiler::StaticType::Void, { Compiler::StaticType::Number }, { v });
484+
485+ v = m_builder->addConstValue (true );
486+ v = m_builder->addFunctionCall (" test_const_bool" , Compiler::StaticType::Bool, { Compiler::StaticType::Bool }, { v });
487+ m_builder->addFunctionCall (" test_print_bool" , Compiler::StaticType::Void, { Compiler::StaticType::Bool }, { v });
488+
489+ v = m_builder->addConstValue (321.5 );
490+ m_builder->addFunctionCall (" test_print_unknown" , Compiler::StaticType::Void, { Compiler::StaticType::Unknown }, { v });
491+
492+ v = m_builder->addConstValue (" test" );
493+ m_builder->addFunctionCall (" test_print_unknown" , Compiler::StaticType::Void, { Compiler::StaticType::Unknown }, { v });
494+
495+ v = m_builder->addConstValue (true );
496+ m_builder->addFunctionCall (" test_print_unknown" , Compiler::StaticType::Void, { Compiler::StaticType::Unknown }, { v });
497+
480498 auto code = m_builder->finalize ();
481499 Script script (&m_target, nullptr , nullptr );
482500 script.setCode (code);
@@ -497,7 +515,12 @@ TEST_F(LLVMCodeBuilderTest, FunctionCalls)
497515 " 1_arg_ret 1\n "
498516 " 3_args 1_arg_output 2 3\n "
499517 " 3_args test 4 5\n "
500- " 1_arg 3_args_output\n " ;
518+ " 1_arg 3_args_output\n "
519+ " 123\n "
520+ " 1\n "
521+ " 321.5\n "
522+ " test\n "
523+ " true\n " ;
501524
502525 EXPECT_CALL (m_target, isStage ()).Times (7 );
503526 testing::internal::CaptureStdout ();
0 commit comments