Failing test case for flx scene switch
This commit is contained in:
@@ -648,7 +648,6 @@ class Kiss {
|
||||
}
|
||||
}
|
||||
#end
|
||||
|
||||
return expr;
|
||||
}
|
||||
|
||||
|
BIN
projects/hollywoo-flixel/src/test/assets/blackSquare.png
Normal file
BIN
projects/hollywoo-flixel/src/test/assets/blackSquare.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 819 B |
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
BIN
projects/hollywoo-flixel/src/test/assets/whiteSquare.png
Normal file
BIN
projects/hollywoo-flixel/src/test/assets/whiteSquare.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
39
projects/hollywoo-flixel/src/test/source/Test.hollywoo
Normal file
39
projects/hollywoo-flixel/src/test/source/Test.hollywoo
Normal file
@@ -0,0 +1,39 @@
|
||||
// When the sound device is non-functional, the FlxSound finish callback won't be called.
|
||||
// Don't let that stop Hollywoo:
|
||||
{(prop &mut soundPlayed false)(cc)}
|
||||
(preload
|
||||
(newFlxSound "pageFlip" AssetPaths.pageTurn__wav))
|
||||
{(delay 1 ->:Void (assert soundPlayed)) (cc)}
|
||||
AWAITPLAYSOUND "pageFlip"
|
||||
{(set soundPlayed true) (cc)}
|
||||
|
||||
// Through scene transitions, set background sprites need to maintain the same size.
|
||||
(defMacro makeSetAndScene [asset]
|
||||
`(preload
|
||||
(newFlxSet ,asset ,asset)
|
||||
(newSceneFromSet ,asset ,asset Day Exterior)))
|
||||
|
||||
(var basicSceneKey AssetPaths.whiteBackground1280x720__png)
|
||||
(makeSetAndScene basicSceneKey)
|
||||
(prop &mut sk "")
|
||||
(prop &mut firstWidth 0.0)
|
||||
(prop &mut firstHeight 0.0)
|
||||
(defMacro testSetBackground [asset]
|
||||
`(commands
|
||||
(makeSetAndScene ,asset)
|
||||
{(set sk ,asset) (cc)}
|
||||
SETSCENE sk
|
||||
(withSceneSet sk set
|
||||
(assert (or (= FlxG.width set.width) (= FlxG.height set.height)))
|
||||
(set firstWidth set.width)
|
||||
(set firstHeight set.height))
|
||||
SETSCENE basicSceneKey
|
||||
SETSCENE sk
|
||||
(withSceneSet sk set
|
||||
(assert (and (= firstWidth set.width) (= firstHeight set.height))))))
|
||||
|
||||
(testSetBackground AssetPaths.grayBackground1280x720__png)
|
||||
(testSetBackground AssetPaths.grayBackground1000x720__png)
|
||||
(testSetBackground AssetPaths.grayBackground1280x580__png)
|
||||
|
||||
(Sys.exit 0)
|
3
projects/hollywoo-flixel/test.sh
Executable file
3
projects/hollywoo-flixel/test.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
(cd src/test && haxelib run lime test cpp -debug)
|
@@ -1,8 +0,0 @@
|
||||
{(prop &mut soundPlayed false)(cc)}
|
||||
(preload
|
||||
(newFlxSound "pageFlip" AssetPaths.pageTurn__wav))
|
||||
{(delay 1 ->:Void (assert soundPlayed)) (cc)}
|
||||
AWAITPLAYSOUND "pageFlip"
|
||||
{(set soundPlayed true) (cc)}
|
||||
|
||||
(Sys.exit 0)
|
Reference in New Issue
Block a user