autoupdate manifest

This commit is contained in:
Igor Kravchenko 2020-10-03 01:12:18 +03:00
parent 1c8c063e01
commit 39692bbfc2
3 changed files with 5 additions and 4 deletions

View File

@ -344,7 +344,7 @@ public class EntityStateMachine<StateName: Hashable> {
for (identifier, _) in currentState.providers {
if let other = toAdd[identifier], let current = currentState.providers[identifier],
current.identifier == other.identifier {
current.identifier == other.identifier {
toAdd[identifier] = nil
} else {
entity.remove(identifier)

View File

@ -413,7 +413,7 @@ class EntityStateMachineTests: XCTestCase {
XCTAssertTrue(entity.get(component: MockComponent.self) === component1)
XCTAssertTrue(entity.get(component: MockComponent2.self) === component2)
}
func testGetsDeinitedWhileBeingStronglyReferencedByComponentAssignedToEntity() {
class Marker: Component {
let fsm: EntityStateMachine<String>
@ -421,7 +421,7 @@ class EntityStateMachineTests: XCTestCase {
self.fsm = fsm
}
}
let nexus = Nexus()
var entity = nexus.createEntity()
var markerComponent = Marker(fsm: EntityStateMachine<String>(entity: entity))

View File

@ -103,7 +103,8 @@ extension EntityStateMachineTests {
("testEnterSecondStateDoesNotRemoveOverlappingComponents", testEnterSecondStateDoesNotRemoveOverlappingComponents),
("testEnterSecondStateRemovesDifferentComponentsOfSameType", testEnterSecondStateRemovesDifferentComponentsOfSameType),
("testEnterSecondStateRemovesFirstStatesComponents", testEnterSecondStateRemovesFirstStatesComponents),
("testEnterStateAddsStatesComponents", testEnterStateAddsStatesComponents)
("testEnterStateAddsStatesComponents", testEnterStateAddsStatesComponents),
("testGetsDeinitedWhileBeingStronglyReferencedByComponentAssignedToEntity", testGetsDeinitedWhileBeingStronglyReferencedByComponentAssignedToEntity)
]
}