chromium/ui/base/glib/scoped_gsignal_unittest.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ui/base/glib/scoped_gsignal.h"

#include "base/functional/bind.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/glib/scoped_gobject.h"

namespace ui {

namespace {

G_DECLARE_FINAL_TYPE(TestObject, test_object, TEST, OBJECT, GObject)

// Used by G_DECLARE_FINAL_TYPE above.
struct _TestObject {};

G_DEFINE_TYPE()

// Used by G_DEFINE_TYPE above.
void test_object_class_init(TestObjectClass*) {}

// Used by G_DEFINE_TYPE above.
void test_object_init(TestObject* self) {}

ScopedGObject<GObject> CreateGObject() {}

void EmitSignal(GObject* instance, const gchar* detailed_signal) {}

}  // namespace

TEST(ScopedGSignalTest, Empty) {}

TEST(ScopedGSignalTest, Construction) {}

TEST(ScopedGSignalTest, DisconnectsOnDestruction) {}

TEST(ScopedGSignalTest, DisconnectsOnGClosureFinalize) {}

TEST(ScopedGSignalTest, DisconnectsOnReset) {}

TEST(ScopedGSignalTest, MoveConstruct) {}

TEST(ScopedGSignalTest, MoveAssign) {}

TEST(ScopedGSignalTest, SignalHandlerCalled) {}

TEST(ScopedGSignalTest, InvalidSignal) {}

}  // namespace ui