• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "flutter/runtime/dart_service_isolate.h"
6 #include "flutter/testing/testing.h"
7 
8 namespace flutter {
9 
TEST(DartServiceIsolateTest,CanAddAndRemoveHandles)10 TEST(DartServiceIsolateTest, CanAddAndRemoveHandles) {
11   ASSERT_EQ(DartServiceIsolate::AddServerStatusCallback(nullptr), 0);
12   auto handle = DartServiceIsolate::AddServerStatusCallback([](const auto&) {});
13   ASSERT_NE(handle, 0);
14   ASSERT_TRUE(DartServiceIsolate::RemoveServerStatusCallback(handle));
15 }
16 
17 }  // namespace flutter
18