Skip to content
Snippets Groups Projects

Add missing tests and check that required formula exist at runtime

1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
+ 3
3
@@ -48,7 +48,9 @@ TEST_CASE("SocketModule", "[language]")
auto connect_socket_server = [&name_builtin_function](const std::string& hostname, int64_t port) {
auto i_function = name_builtin_function.find("connectSocketServer:string*N");
REQUIRE(i_function != name_builtin_function.end());
if (i_function == name_builtin_function.end()) {
FAIL_CHECK("Cannot connect to server. This should NEVER happen");
}
DataVariant hostname_variant = hostname;
DataVariant port_variant = port;
@@ -56,8 +58,6 @@ TEST_CASE("SocketModule", "[language]")
IBuiltinFunctionEmbedder& function_embedder = *i_function->second;
DataVariant result_variant = function_embedder.apply({hostname_variant, port_variant});
REQUIRE_NOTHROW(dynamic_cast<const DataHandler<const Socket>&>(std::get<EmbeddedData>(result_variant).get()));
return dynamic_cast<const DataHandler<const Socket>&>(std::get<EmbeddedData>(result_variant).get()).data_ptr();
};
Loading