Browse Source

Fixes for integration tests running on Windows.

master
Chris Gregan 8 years ago
parent
commit
09b23d5f68
  1. 3
      Assets/Fungus/Scripts/Components/PortraitController.cs
  2. 8
      Assets/Tests/Narrative/NarrativeTests.cs
  3. 13
      Assets/Tests/Narrative/NarrativeTests.unity
  4. 15
      Assets/Tests/UI/TextTests.unity

3
Assets/Fungus/Scripts/Components/PortraitController.cs

@ -221,6 +221,9 @@ namespace Fungus
yield return null;
}
// Wait until next frame just to be safe
yield return new WaitForEndOfFrame();
if (onComplete != null)
{
onComplete();

8
Assets/Tests/Narrative/NarrativeTests.cs

@ -186,15 +186,15 @@ public class NarrativeTests : Command
{
Transform johnTransform = stage.transform.Find("Canvas/JohnCharacter");
if (Mathf.Approximately(johnTransform.localPosition.x, 0f))
// Running on windows this position can end up as a tiny non-zero value that
// Mathf.Approximately doesn't match as zero. Using a less strict comparison.
if (johnTransform.localPosition.x < 0.001f)
{
Pass();
}
else
{
Debug.Log (johnTransform.localPosition.x);
Fail("Image position after move not correct");
Fail("Image position after move not zero: " + johnTransform.localPosition.x);
}
}

13
Assets/Tests/Narrative/NarrativeTests.unity

@ -117,7 +117,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name:
m_EditorClassIdentifier:
selectedFlowchart: {fileID: 736071350}
selectedFlowchart: {fileID: 891159642}
--- !u!4 &11556238
Transform:
m_ObjectHideFlags: 1
@ -8161,9 +8161,8 @@ MonoBehaviour:
y: -350
width: 1502
height: 989
selectedBlock: {fileID: 891159643}
selectedCommands:
- {fileID: 891159656}
selectedBlock: {fileID: 891159676}
selectedCommands: []
variables: []
description:
stepPause: 0
@ -8790,7 +8789,7 @@ MonoBehaviour:
serializedVersion: 2
x: 212
y: 139
width: 120
width: 122
height: 40
itemId: 17
blockName: TestPortraits
@ -18555,7 +18554,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &2084461895
Transform:
m_ObjectHideFlags: 0
@ -18585,7 +18584,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b1dba0b27b0864740a8720e920aa88c0, type: 3}
m_Name:
m_EditorClassIdentifier:
timeout: 30
timeout: 35
ignored: 0
succeedAfterAllAssertionsAreExecuted: 0
expectException: 0

15
Assets/Tests/UI/TextTests.unity

@ -778,7 +778,7 @@ MonoBehaviour:
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
blockViewHeight: 400
zoom: 1
zoom: 0.99975
scrollViewRect:
serializedVersion: 2
x: -343
@ -787,7 +787,7 @@ MonoBehaviour:
height: 859
selectedBlock: {fileID: 332004788}
selectedCommands:
- {fileID: 332004791}
- {fileID: 332004790}
variables: []
description:
stepPause: 0
@ -881,7 +881,8 @@ MonoBehaviour:
textObject: {fileID: 1490749230}
text:
stringRef: {fileID: 0}
stringVal: Write some text with sound effects
stringVal: Write out some more text with sound effects that takes a second or
two to complete
description:
clearText: 1
waitUntilFinished: 1
@ -1575,7 +1576,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b1dba0b27b0864740a8720e920aa88c0, type: 3}
m_Name:
m_EditorClassIdentifier:
timeout: 5
timeout: 6
ignored: 0
succeedAfterAllAssertionsAreExecuted: 1
expectException: 0
@ -4963,7 +4964,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8bafa54482a87ac4cbd7ff1bfd1ac93a, type: 3}
m_Name:
m_EditorClassIdentifier:
checkAfterTime: 2.25
checkAfterTime: 2.3
repeatCheckTime: 0
repeatEveryTime: 1
checkAfterFrames: 1
@ -6156,7 +6157,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_RotationOrder: 0
spreadCustomCurve:
serializedVersion: 2
m_Curve:
@ -6178,7 +6179,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_RotationOrder: 0
--- !u!1 &1518184822
GameObject:
m_ObjectHideFlags: 0

Loading…
Cancel
Save