コード例 #1
0
def test_stop():
    speeds = resolve(0, 0)
    expect(DirectionResolver().resolve(speeds)).to(equal('S'))
コード例 #2
0
def test_right():
    speeds = resolve(50, -50)
    expect(DirectionResolver().resolve(speeds)).to(equal('R'))
コード例 #3
0
def test_left():
    speeds = resolve(-50, 50)
    expect(DirectionResolver().resolve(speeds)).to(equal('L'))
コード例 #4
0
def test_reverse_right_with_zero():
    speeds = resolve(-70, 0)
    expect(DirectionResolver().resolve(speeds)).to(equal('RvR'))
コード例 #5
0
def test_reverse_left_with_zero():
    speeds = resolve(0, -70)
    expect(DirectionResolver().resolve(speeds)).to(equal('RvL'))
コード例 #6
0
def test_reverse():
    speeds = resolve(-50, -50)
    expect(DirectionResolver().resolve(speeds)).to(equal('Rv'))
コード例 #7
0
def test_forward_left_with_zero():
    speeds = resolve(0, 50)
    expect(DirectionResolver().resolve(speeds)).to(equal('FL'))
コード例 #8
0
def test_forward_left():
    speeds = resolve(50, 70)
    expect(DirectionResolver().resolve(speeds)).to(equal('FL'))
コード例 #9
0
def test_forward_right_with_zero():
    speeds = resolve(70, 0)
    expect(DirectionResolver().resolve(speeds)).to(equal('FR'))
コード例 #10
0
def test_forward():
    speeds = resolve(50, 50)
    expect(DirectionResolver().resolve(speeds)).to(equal('F'))