diff --git a/tests/test_FunctionArgumentConverter.cpp b/tests/test_FunctionArgumentConverter.cpp index 7befebe52d93fc7ba0e17b940dba88acaecfb306..643fbba0b092d337743ea5aeaedb25eb86a5b445 100644 --- a/tests/test_FunctionArgumentConverter.cpp +++ b/tests/test_FunctionArgumentConverter.cpp @@ -172,6 +172,18 @@ TEST_CASE("FunctionArgumentConverter", "[language]") std::vector<TinyVector<2>>{TinyVector<2>{1, 3.2}, TinyVector<2>{-1, 0.2}}); REQUIRE(std::get<std::vector<TinyVector<2>>>(execution_policy.currentContext()[2]) == std::vector<TinyVector<2>>{TinyVector<2>{-3, 12.2}, TinyVector<2>{2, 1.2}}); + + std::shared_ptr symbol_table = std::make_shared<SymbolTable>(); + AggregateDataVariant v_fid{std::vector<DataVariant>{uint64_t{3}, uint64_t{2}, uint64_t{7}}}; + + FunctionListArgumentConverter<FunctionSymbolId, FunctionSymbolId> converterFid{0, symbol_table}; + converterFid.convert(execution_policy, v_fid); + + auto&& fid_tuple = std::get<std::vector<FunctionSymbolId>>(execution_policy.currentContext()[0]); + + REQUIRE(fid_tuple[0].id() == 3); + REQUIRE(fid_tuple[1].id() == 2); + REQUIRE(fid_tuple[2].id() == 7); } SECTION("FunctionArgumentToFunctionSymbolIdConverter") @@ -184,4 +196,16 @@ TEST_CASE("FunctionArgumentConverter", "[language]") REQUIRE(std::get<FunctionSymbolId>(execution_policy.currentContext()[0]).id() == f_id); } + + SECTION("FunctionArgumentToTupleFunctionSymbolIdConverter") + { + std::shared_ptr symbol_table = std::make_shared<SymbolTable>(); + + const uint64_t f_id = 3; + FunctionArgumentToTupleFunctionSymbolIdConverter converter0{0, symbol_table}; + converter0.convert(execution_policy, f_id); + auto&& tuple = std::get<std::vector<FunctionSymbolId>>(execution_policy.currentContext()[0]); + REQUIRE(tuple.size() == 1); + REQUIRE(tuple[0].id() == f_id); + } }