Browse Source

refactoring: Funktionsnamen und Parametervariablen verbessert

remotes/origin/habib
Habib 11 months ago
parent
commit
e877a91680
  1. 4
      src/c/funktionen.c
  2. 2
      src/c/funktionen.h
  3. 2
      src/test/test_funktionen.c

4
src/c/funktionen.c

@ -117,8 +117,8 @@ int calculateCurrent(int voltage, int resistance) {
return voltage / resistance;
}
int p(int f, int a) {
return f / a;
int calculatePressure(int force, int area) {
return force / area;
}
float f(float m) {

2
src/c/funktionen.h

@ -55,7 +55,7 @@ int characterAppearanceInString(char c, char string[]);
int calculateCurrent(int voltage, int resistance);
// berechnet den Strom mithilfe ohmsches Gesetzes
int p(int f, int a);
int calculatePressure(int force, int area);
// berechnet den Druck
float f(float m);

2
src/test/test_funktionen.c

@ -251,7 +251,7 @@ void test_pressure_at_force360_area12(void)
/* act */
int f = 360;
int a = 12;
actual = p(f, a);
actual = calculatePressure(f, a);
/* assert */
TEST_ASSERT_EQUAL_INT(expected, actual);

Loading…
Cancel
Save