blob: f2823689f6723ec093ad2f50314c20692ed65b20 [file] [log] [blame]
// Copyright 2018 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "flutter/runtime/dart_service_isolate.h"
#include "flutter/testing/testing.h"
namespace blink {
TEST(DartServiceIsolateTest, CanAddAndRemoveHandles) {
ASSERT_EQ(DartServiceIsolate::AddServerStatusCallback(nullptr), 0);
auto handle = DartServiceIsolate::AddServerStatusCallback([](const auto&) {});
ASSERT_NE(handle, 0);
ASSERT_TRUE(DartServiceIsolate::RemoveServerStatusCallback(handle));
}
} // namespace blink