From 1c2fcab99adf3179df347ac352cfd5af1bd19014 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sat, 20 Feb 2016 19:42:27 +0100 Subject: Import second part unit tests --- test/ch/epfl/xblast/namecheck/NameCheck02.java | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 test/ch/epfl/xblast/namecheck/NameCheck02.java (limited to 'test') diff --git a/test/ch/epfl/xblast/namecheck/NameCheck02.java b/test/ch/epfl/xblast/namecheck/NameCheck02.java new file mode 100644 index 0000000..978526e --- /dev/null +++ b/test/ch/epfl/xblast/namecheck/NameCheck02.java @@ -0,0 +1,60 @@ +package ch.epfl.xblast.namecheck; + +import java.util.List; + +import ch.epfl.cs108.Sq; +import ch.epfl.xblast.Cell; +import ch.epfl.xblast.Lists; +import ch.epfl.xblast.server.Block; +import ch.epfl.xblast.server.Board; +import ch.epfl.xblast.server.Ticks; + +/** + * Classe abstraite utilisant tous les éléments de l'étape 2, pour essayer de + * garantir que ceux-ci ont le bon nom et les bons types. Attention, ceci n'est + * pas un test unitaire, et n'a pas pour but d'être exécuté! + */ + +abstract class NameCheck02 { + void checkTicks() { + int x = Ticks.PLAYER_DYING_TICKS + + Ticks.PLAYER_INVULNERABLE_TICKS + + Ticks.BOMB_FUSE_TICKS + + Ticks.EXPLOSION_TICKS + + Ticks.WALL_CRUMBLING_TICKS + + Ticks.BONUS_DISAPPEARING_TICKS; + System.out.println(x); + } + + void checkBlock() { + Block b = Block.FREE; + b = Block.INDESTRUCTIBLE_WALL; + b = Block.DESTRUCTIBLE_WALL; + b = Block.CRUMBLING_WALL; + boolean d = b.isFree() && b.canHostPlayer() && b.castsShadow(); + System.out.println(b + "/" + d); + } + + void checkLists() { + List l1 = null; + List l2 = null; + List> l3 = null; + List l1m = Lists.mirrored(l1); + List l2m = Lists.mirrored(l2); + List> l3m = Lists.>mirrored(l3); + System.out.println("" + l1m + l2m + l3m); + } + + void checkBoard() { + List> q = null; + Board b = Board.ofQuadrantNWBlocksWalled(q); + b = Board.ofInnerBlocksWalled(q); + b = Board.ofRows(q); + List> cells = null; + b = new Board(cells); + Cell c = null; + Sq bs = b.blocksAt(c); + Block l = b.blockAt(c); + System.out.println(bs + "/" + l); + } +} -- cgit v1.2.3