gobot.io/x/gobot@v1.16.0/platforms/parrot/bebop/pitch_test.go (about) 1 package bebop 2 3 import ( 4 "testing" 5 6 "gobot.io/x/gobot/gobottest" 7 ) 8 9 func TestBebopValidatePitchWhenEqualOffset(t *testing.T) { 10 gobottest.Assert(t, ValidatePitch(32767.0, 32767.0), 100) 11 } 12 13 func TestBebopValidatePitchWhenTiny(t *testing.T) { 14 gobottest.Assert(t, ValidatePitch(1.1, 32767.0), 0) 15 } 16 17 func TestBebopValidatePitchWhenCentered(t *testing.T) { 18 gobottest.Assert(t, ValidatePitch(16383.5, 32767.0), 50) 19 }