File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Assets/AdncAnimatorHelpers/Editor/Testing Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ public void Teardown () {
20
20
}
21
21
22
22
[ Test ]
23
- public void FailsCreationIfNoGameObject ( ) {
23
+ public void DoesNotFailCreationIfNoGameObject ( ) {
24
24
var stub = new AnimatorStub ( null ) ;
25
25
26
- Assert . IsFalse ( stub . IsValid ) ;
26
+ Assert . IsTrue ( stub . IsValid ) ;
27
27
}
28
28
29
29
[ Test ]
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public void Teardown () {
41
41
Object . DestroyImmediate ( _stub . Animator . gameObject ) ;
42
42
_stub = null ;
43
43
44
+ Object . DestroyImmediate ( _runtime . gameObject ) ;
44
45
AnimatorHelperRuntime . ClearSingleton ( ) ;
45
46
_runtime = null ;
46
47
}
@@ -79,6 +80,8 @@ public void HasParameterGetsTheSameParameterCacheAcrossAnimatorControllers () {
79
80
Assert . IsTrue ( AnimatorHelperRuntime . Instance . parameters . HasParameters ( id ) ) ;
80
81
81
82
Assert . IsTrue ( clone . HasParameter ( "bool" ) ) ;
83
+
84
+ Object . DestroyImmediate ( clone . gameObject ) ;
82
85
}
83
86
84
87
[ Test ]
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ public void Teardown () {
21
21
Object . DestroyImmediate ( _stub . Animator . gameObject ) ;
22
22
_stub = null ;
23
23
24
+ Object . DestroyImmediate ( _runtime . gameObject ) ;
24
25
AnimatorHelperRuntime . ClearSingleton ( ) ;
25
26
_runtime = null ;
26
27
}
@@ -39,7 +40,7 @@ public void CallWithSingleParameter () {
39
40
40
41
[ Test ]
41
42
public void CallWithHundredParameters ( ) {
42
- for ( int i = 0 ; i < 100 ; i ++ ) {
43
+ for ( var i = 0 ; i < 100 ; i ++ ) {
43
44
_stub . AnimatorCtrl . AddParameter ( new AnimatorControllerParameter {
44
45
name = "bool" + i ,
45
46
type = AnimatorControllerParameterType . Bool
@@ -53,7 +54,7 @@ public void CallWithHundredParameters () {
53
54
54
55
[ Test ]
55
56
public void CallWithThosandParameters ( ) {
56
- for ( int i = 0 ; i < 1000 ; i ++ ) {
57
+ for ( var i = 0 ; i < 1000 ; i ++ ) {
57
58
_stub . AnimatorCtrl . AddParameter ( new AnimatorControllerParameter {
58
59
name = "bool" + i ,
59
60
type = AnimatorControllerParameterType . Bool
You can’t perform that action at this time.
0 commit comments