文章标题

本文档为Jumper类的功能测试报告,主要测试了move(), canMove(), act() 和 putSelfInGrid() 函数。测试覆盖了不同场景如BoundedGrid和UnboundedGrid,并验证了这些方法在各种条件下的表现。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

15331334 徐楚燕 testreport

version 1.0.0

修订历史

日期版本作者描述
2017.03.261.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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值