Exemplo n.º 1
0
func TestCalculatesGearInches(t *testing.T) {
	gear := gear1.NewGear(52, 11, 26, 1.5)
	if gear.GearInches() < (137.1-0.1) || gear.GearInches() > (137.1+0.1) {
		t.Errorf("Expected gear inches %f to be 137.1", gear.GearInches())
	}
}
Exemplo n.º 2
0
func (s *MySuite) TestCalculatesGearInches(c *C) {
	gear := gear1.NewGear(52, 11, 26, 1.5)
	c.Assert(gear.GearInches(), Within, 0.01, 137.1)
}