5#include "flutter/runtime/dart_vm_lifecycle.h"
6#include "flutter/testing/dart_isolate_runner.h"
7#include "flutter/testing/fixture_test.h"
8#include "flutter/testing/testing.h"
9#include "flutter/third_party/tonic/converter/dart_converter.h"
26 if (running_isolate_) {
31 thread, thread, thread);
39 running_isolate_ = std::move(isolate);
46 std::unique_ptr<AutoIsolateShutdown> running_isolate_;
51 ASSERT_TRUE(RunWithEntrypoint(
"main"));
65 std::vector<int64_t> items;
71 ASSERT_TRUE(RunWithEntrypoint(
"trampoline"));
86 std::vector<std::string> items;
87 items.push_back(
"tinker");
88 items.push_back(
"tailor");
89 items.push_back(
"soldier");
90 items.push_back(
"sailor");
94 "testCanConvertListOfStrings", {items_handle});
96 ASSERT_TRUE(RunWithEntrypoint(
"trampoline"));
111 std::vector<double> items;
112 items.push_back(1.0);
113 items.push_back(2.0);
114 items.push_back(3.0);
115 items.push_back(4.0);
119 "testCanConvertListOfDoubles", {items_handle});
121 ASSERT_TRUE(RunWithEntrypoint(
"trampoline"));
136 std::vector<int32_t> items;
146 ASSERT_TRUE(RunWithEntrypoint(
"trampoline"));
static sk_sp< Effect > Create()
virtual Settings CreateSettingsForFixture()
fml::RefPtr< fml::TaskRunner > CreateNewThread(const std::string &name="")
Creates a new thread, initializes a message loop on it, and, returns its task runner to the unit-test...
bool RunWithEntrypoint(const std::string &entrypoint)
~TypeConversionsTest()=default
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
struct _Dart_NativeArguments * Dart_NativeArguments
DART_EXPORT Dart_Handle Dart_RootLibrary(void)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
std::string GetCurrentTestName()
Gets the name of the currently running test. This is useful in generating logs or assets based on tes...
TEST_F(DisplayListTest, Defaults)
std::string GetDefaultKernelFilePath()
Returns the default path to kernel_blob.bin. This file is within the directory returned by GetFixture...
std::unique_ptr< AutoIsolateShutdown > RunDartCodeInIsolate(DartVMRef &vm_ref, const Settings &settings, const TaskRunners &task_runners, std::string entrypoint, const std::vector< std::string > &args, const std::string &kernel_file_path, fml::WeakPtr< IOManager > io_manager, std::shared_ptr< VolatilePathTracker > volatile_path_tracker, std::unique_ptr< PlatformConfiguration > platform_configuration)
Dart_Handle ToDart(const T &object)
bool CheckAndHandleError(Dart_Handle handle)
Dart_Handle DartInvokeField(Dart_Handle target, const char *name, std::initializer_list< Dart_Handle > args)
#define CREATE_NATIVE_ENTRY(native_entry)