ladybird/Tests/ClangPlugins/LibJSGCTests/Macros/classes_are_missing_expected_macros.cpp
Andreas Kling e87f889e31 Everywhere: Abandon Swift adoption
After making no progress on this for a very long time, let's acknowledge
it's not going anywhere and remove it from the codebase.
2026-02-17 10:48:09 -05:00

30 lines
953 B
C++

/*
* Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
#include <LibJS/Runtime/PrototypeObject.h>
#include <LibWeb/Bindings/PlatformObject.h>
// expected-error@+1 {{Expected record to have a GC_CELL macro invocation}}
class TestCellClass : JS::Cell {
};
// expected-error@+1 {{Expected record to have a JS_OBJECT macro invocation}}
class TestObjectClass : JS::Object {
};
// expected-error@+1 {{Expected record to have a JS_ENVIRONMENT macro invocation}}
class TestEnvironmentClass : JS::Environment {
};
// expected-error@+1 {{Expected record to have a JS_PROTOTYPE_OBJECT macro invocation}}
class TestPrototypeClass : JS::PrototypeObject<TestCellClass, TestCellClass> {
};
// expected-error@+1 {{Expected record to have a WEB_PLATFORM_OBJECT macro invocation}}
class TestPlatformClass : Web::Bindings::PlatformObject {
};