Skip to content

Commit

Permalink
Fixed class registration clash.
Browse files Browse the repository at this point in the history
  • Loading branch information
samdeane committed Dec 5, 2024
1 parent d74265e commit b4b4927
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/SwiftGodotTests/SignalTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SwiftGodotTestability
@testable import SwiftGodot

@Godot
private class TestNode: Node {
private class TestSignalNode: Node {
#signal("mySignal", arguments: ["age": Int.self, "name": String.self])
var receivedInt: Int? = nil
var receivedString: String? = nil
Expand All @@ -17,14 +17,14 @@ private class TestNode: Node {
final class SignalTests: GodotTestCase {
override static var godotSubclasses: [Wrapped.Type] {
return [TestNode.self]
return [TestSignalNode.self]
}
func testUserDefinedSignal() {
let node = TestNode()
let node = TestSignalNode()
node.connect (signal: TestNode.mySignal, to: node, method: "receiveSignal")
node.emit (signal: TestNode.mySignal, 22, "Joey")
node.connect (signal: TestSignalNode.mySignal, to: node, method: "receiveSignal")
node.emit (signal: TestSignalNode.mySignal, 22, "Joey")

XCTAssertEqual (node.receivedInt, 22, "Integers should have been the same")
XCTAssertEqual (node.receivedString, "Joey", "Strings should have been the same")
Expand Down

0 comments on commit b4b4927

Please sign in to comment.