文章標題

15331334 徐楚燕 testreport

version 1.0.0

修訂歷史

日期 版本 作者 描述
2017.03.26 1.0.0 徐楚燕 初始版本

Class JumperTest

Description

This class is used to test class Jumper.

測試計劃

測試Jumper類的 move(), canMove(), act()putSelfInGrid()函數。

Method Summary

這裏寫圖片描述

testPutSelf

Test for putSelfInGrid().

這裏寫圖片描述

Test Result: Pass. putSelfInGrid() works fine.

testcanMovewithActors

Test the return value of canMove() when Actors and Jumper are positioned like this:

這裏寫圖片描述

這裏寫圖片描述

Test Result: All test for canMove() returns false. Test Pass.
canMove() works fine.

testAct

Given in BoundedGrid, starting from (0,0), test the result Location of invoking five times of act().

這裏寫圖片描述

Test Result: This test fail as the test condition(0,7) is wrong.
act() works fine.

testMoveinUnbounded

Given in UnboundedGrid, starting from (0,0), test the result of invoking Move().

這裏寫圖片描述

Test Result: In unboundedGrid, Actor can have location with negative values. Test Pass.
move() works fine in UnboundedGrid.

testMoveinBounded

Given in BoundedGrid, starting from (0,0), test the result of invoking Move().

這裏寫圖片描述

Test Result: In BoundedGrid, Actor can not have location with negative values. Invoking move() directly cause the Jumper moves into invalid grid and therefore elimates itself.
As a result, this test will pass because the location will be null.
Test Pass.
move() works fine in BoundedGrid.

testcanMoveinBounded

Given in BoundedGrid, starting from (0,0), test the return value of canMove().

這裏寫圖片描述

Test Result: The first test of canMove() will get a false value as the Jumper faces north at the initial state. Test Pass.
canMove() works fine in BoundedGrid.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章