@ -120,3 +120,7 @@ int i(int v, int r) {
int p(int f, int a) {
return f / a;
}
float f(float m) {
return m * 9.81;
@ -257,4 +257,18 @@ void test_pressure_at_force360_area12(void)
TEST_ASSERT_EQUAL_INT(expected, actual);
void test_weight_at_mass100(void)
{
/* arrange */
float actual;
float expected = 981;
/* act */;
float m = 100;
actual = f(m);
/* assert */
TEST_ASSERT_EQUAL_FLOAT(expected, actual);
#endif