Crossfire JXClient, Trunk
R20561
|
Regression tests for MapUpdaterState. More...
Public Member Functions | |
void | testDisplayArtifacts1 () throws IOException |
Checks that a regression causing display artifacts is fixed. More... | |
void | testDisplayArtifacts2 () throws IOException |
Checks that a regression causing display artifacts is fixed. More... | |
void | testDisplayArtifacts3 () throws IOException |
Checks that a regression causing display artifacts is fixed. More... | |
void | testFogOfWar1 () throws IOException |
Checks that a cleared multi-tile face causes all affected tiles to become fog-of-war. More... | |
Static Private Member Functions | |
static void | defineFace (@NotNull final FaceCache faceCache, final int faceNum, @NotNull final String faceName, @NotNull final byte[] data) |
Adds a new face to a FaceCache. More... | |
static String | toString (@NotNull final CfMap map, final int x0, final int y0, final int w, final int h) |
Returns a string representation of a rectangular area of a CfMap instance. More... | |
Static Private Attributes | |
static final byte [] | PNG128X256 |
A .png file of size 128x256. More... | |
static final byte [] | PNG32X32 |
A .png file of size 64x64. More... | |
static final byte [] | PNG64X64 |
A .png file of size 64x64. More... | |
Regression tests for MapUpdaterState.
Definition at line 42 of file MapUpdaterStateTest.java.
|
staticprivate |
Adds a new face to a FaceCache.
faceCache | the face cache to add to |
faceNum | the face number to add |
faceName | the face name to add |
data | the face data as .png |
Definition at line 771 of file MapUpdaterStateTest.java.
References com.realtime.crossfire.jxclient.faces.FaceImagesUtils.newFaceImages(), and com.realtime.crossfire.jxclient.faces.Face.setFaceImages().
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testDisplayArtifacts1(), com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testDisplayArtifacts2(), com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testDisplayArtifacts3(), and com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testFogOfWar1().
void com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testDisplayArtifacts1 | ( | ) | throws IOException |
Checks that a regression causing display artifacts is fixed.
IOException | if an error occurs |
Definition at line 532 of file MapUpdaterStateTest.java.
References com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.defineFace(), com.realtime.crossfire.jxclient.map.MapUpdaterState.getMap(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapBegin(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapClear(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapEnd(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapFace(), com.realtime.crossfire.jxclient.map.MapUpdaterState.newMap(), com.realtime.crossfire.jxclient.map.MapUpdaterState.tick(), and com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.toString().
void com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testDisplayArtifacts2 | ( | ) | throws IOException |
Checks that a regression causing display artifacts is fixed.
IOException | if an error occurs |
Definition at line 624 of file MapUpdaterStateTest.java.
References com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.defineFace(), com.realtime.crossfire.jxclient.map.MapUpdaterState.getMap(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapBegin(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapClear(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapEnd(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapFace(), com.realtime.crossfire.jxclient.map.MapUpdaterState.newMap(), and com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.toString().
void com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testDisplayArtifacts3 | ( | ) | throws IOException |
Checks that a regression causing display artifacts is fixed.
IOException | if an error occurs |
Definition at line 652 of file MapUpdaterStateTest.java.
References com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.defineFace(), com.realtime.crossfire.jxclient.map.MapUpdaterState.getMap(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapBegin(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapClear(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapEnd(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapFace(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapScroll(), com.realtime.crossfire.jxclient.map.MapUpdaterState.newMap(), and com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.toString().
void com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testFogOfWar1 | ( | ) | throws IOException |
Checks that a cleared multi-tile face causes all affected tiles to become fog-of-war.
IOException | if an error occurs |
Definition at line 495 of file MapUpdaterStateTest.java.
References com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.defineFace(), com.realtime.crossfire.jxclient.map.MapUpdaterState.getMap(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapBegin(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapClear(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapEnd(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapFace(), com.realtime.crossfire.jxclient.map.MapUpdaterState.newMap(), and com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.toString().
|
staticprivate |
Returns a string representation of a rectangular area of a CfMap instance.
map | the map instance |
x0 | the left border of the area |
y0 | the top border of the area |
w | the width of the area |
h | the height of the area |
Definition at line 715 of file MapUpdaterStateTest.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.getFace(), com.realtime.crossfire.jxclient.faces.Face.getFaceName(), com.realtime.crossfire.jxclient.map.CfMapSquare.getHeadMapSquare(), com.realtime.crossfire.jxclient.protocol.Map2.NUM_LAYERS, and com.realtime.crossfire.jxclient.faces.Face.toString().
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testDisplayArtifacts1(), com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testDisplayArtifacts2(), com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testDisplayArtifacts3(), and com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.testFogOfWar1().
|
staticprivate |
A .png file of size 128x256.
Definition at line 267 of file MapUpdaterStateTest.java.
|
staticprivate |
A .png file of size 64x64.
Definition at line 48 of file MapUpdaterStateTest.java.
|
staticprivate |
A .png file of size 64x64.
Definition at line 151 of file MapUpdaterStateTest.java.