changed tests to not use magic numbers
This commit is contained in:
parent
1a5324aef6
commit
098d34c853
|
@ -42,17 +42,17 @@ TEST(test_TriacOut, TriacOut_SetupPins)
|
||||||
//Expect that pin PA1 is set to output
|
//Expect that pin PA1 is set to output
|
||||||
mock().expectOneCall("RegEdit_SetBit")
|
mock().expectOneCall("RegEdit_SetBit")
|
||||||
.withPointerParameter("reg", (void *) &PORTA.DIR)
|
.withPointerParameter("reg", (void *) &PORTA.DIR)
|
||||||
.withUnsignedIntParameter("bit_num", (1<<1));
|
.withUnsignedIntParameter("bit_num", G1);
|
||||||
|
|
||||||
//Expect that pin PB3 is set to output
|
//Expect that pin PB3 is set to output
|
||||||
mock().expectOneCall("RegEdit_SetBit")
|
mock().expectOneCall("RegEdit_SetBit")
|
||||||
.withPointerParameter("reg", (void *) &PORTB.DIR)
|
.withPointerParameter("reg", (void *) &PORTB.DIR)
|
||||||
.withUnsignedIntParameter("bit_num", (1<<3));
|
.withUnsignedIntParameter("bit_num", G2);
|
||||||
|
|
||||||
//Expect that pin PB2 is set to output
|
//Expect that pin PB2 is set to output
|
||||||
mock().expectOneCall("RegEdit_SetBit")
|
mock().expectOneCall("RegEdit_SetBit")
|
||||||
.withPointerParameter("reg", (void *) &PORTB.DIR)
|
.withPointerParameter("reg", (void *) &PORTB.DIR)
|
||||||
.withUnsignedIntParameter("bit_num", (1<<2));
|
.withUnsignedIntParameter("bit_num", G3);
|
||||||
|
|
||||||
TriacOut_SetupPins();
|
TriacOut_SetupPins();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue