Browse Source

Merge branch 'testing' into 'main'

Testing in Main

See merge request fdai7812/theadmirals!12
main
fdai7728 11 months ago
parent
commit
c034e02a55
  1. 4
      test/test_arithmeticMultiplication_Double.c
  2. 4
      test/test_arithmeticMultiplication_Float.c
  3. 6
      test/test_convert_C_to_F.c
  4. 4
      test/test_convert_g_to_mg.c
  5. 4
      test/test_convert_kg_to_g.c
  6. 2
      test/test_convert_kg_to_ton.c
  7. 4
      test/test_convert_ton_to_kg.c
  8. 8
      test/test_convert_ton_to_mt.c

4
test/test_arithmeticMultiplication_Double.c

@ -3,11 +3,11 @@
#include "limits.h" #include "limits.h"
void setUp(void) { void setUp(void) {
// set up code here
} }
void tearDown(void) { void tearDown(void) {
// clean up code here
} }
void test_arithmeticMultiplication_doubletimesdoubleequalsdouble(void) { void test_arithmeticMultiplication_doubletimesdoubleequalsdouble(void) {

4
test/test_arithmeticMultiplication_Float.c

@ -3,11 +3,11 @@
#include "limits.h" #include "limits.h"
void setUp(void) { void setUp(void) {
// set up code here
} }
void tearDown(void) { void tearDown(void) {
// clean up code here
} }
void test_arithmeticMultiplication_floattimesfloatequalsfloat(void) { void test_arithmeticMultiplication_floattimesfloatequalsfloat(void) {

6
test/test_convert_C_to_F.c

@ -8,7 +8,7 @@ void setUp(void) {
} }
void tearDown(void) { void tearDown(void) {
// Clean up resources here if needed
} }
void test_convert_temperature(void) { void test_convert_temperature(void) {
@ -16,10 +16,10 @@ void test_convert_temperature(void) {
char from_unit = 'c'; char from_unit = 'c';
char to_unit = 'f'; char to_unit = 'f';
// Perform the conversion
float result = convert_temperature(temperature, from_unit, to_unit); float result = convert_temperature(temperature, from_unit, to_unit);
// Define the expected result (100 degrees Celsius to Fahrenheit is 212)
float expectedResult = 212; float expectedResult = 212;
// Assert the result // Assert the result

4
test/test_convert_g_to_mg.c

@ -1,5 +1,5 @@
#include "unity.h" // Include the Unity header file
#include "../src/convert_g_to_mg.h" // Include the header file containing the function to be tested
#include "unity.h"
#include "../src/convert_g_to_mg.h"
// Test setup function // Test setup function
void setUp(void) { void setUp(void) {

4
test/test_convert_kg_to_g.c

@ -7,9 +7,9 @@ void setUp(void) {
} }
// Test teardown function
void tearDown(void) { void tearDown(void) {
// This function will be called after each test
} }
// Test case for kg_to_gram function // Test case for kg_to_gram function

2
test/test_convert_kg_to_ton.c

@ -1,4 +1,4 @@
#include "unity.h" // Include the Unity header file
#include "unity.h"
#include "../src/convert_kg_to_ton.h" #include "../src/convert_kg_to_ton.h"
// Test setup function // Test setup function

4
test/test_convert_ton_to_kg.c

@ -1,9 +1,9 @@
#include "unity.h" // Include the Unity header file
#include "unity.h"
#include "../src/convert_ton_to_kg.h" #include "../src/convert_ton_to_kg.h"
#include "limits.h" #include "limits.h"
// Test setup function // Test setup function
void setUp(void) { void setUp(void) {
// This function will be called before each test
} }
// Test teardown function // Test teardown function

8
test/test_convert_ton_to_mt.c

@ -1,14 +1,14 @@
#include "unity.h" // Include the Unity header file #include "unity.h" // Include the Unity header file
#include "../src/convert_ton_to_mt.h" // Include the header file containing the function to be tested
#include "../src/convert_ton_to_mt.h"
// Test setup function // Test setup function
void setUp(void) { void setUp(void) {
// This function will be called before each test
} }
// Test teardown function
void tearDown(void) { void tearDown(void) {
// This function will be called after each test
} }
// Test case for tons_to_megatons function // Test case for tons_to_megatons function

Loading…
Cancel
Save