-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
address an issue where a state without an aniimation can break advanc…
…ing state machines in ios Diffs= cef9bd8cd address an issue where a state without an aniimation can break advanc… (#4832)
- Loading branch information
mjtalbot
committed
Feb 15, 2023
1 parent
627ecee
commit a2cb5ea
Showing
6 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
c7d125c7d4efe1233c16c2a95fb7b637b746b010 | ||
cef9bd8cddeb94916281002fa2491777b1642eff |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// RiveViewModelTest.swift | ||
// RiveRuntimeTests | ||
// | ||
// Created by Maxwell Talbot on 14/02/2023. | ||
// Copyright © 2023 Rive. All rights reserved. | ||
// | ||
|
||
import XCTest | ||
import RiveRuntime | ||
|
||
class RiveViewModelTest: XCTestCase { | ||
|
||
// This test reproduces a previous production error | ||
// Having an Animation state without an animation caused advancing a state machine past it | ||
// to fail | ||
func testLoadFileWithEmptyAnimationState() throws { | ||
let file = try RiveFile(testfileName: "empty_animation_state") | ||
let model = RiveModel(riveFile: file) | ||
let viewModel = RiveViewModel(model, autoPlay: false) | ||
let view = viewModel.createRiveView() | ||
|
||
view.advance(delta: 0.1) | ||
} | ||
} |