mirror of
https://github.com/theoludwig/libcproject.git
synced 2025-05-21 23:21:15 +02:00
feat: first release
This commit is contained in:
@ -31,20 +31,20 @@ void mathematics_pow_test() {
|
||||
}
|
||||
|
||||
void mathematics_root_test() {
|
||||
assert(mathematics_get_is_equal(mathematics_root(0, 0), 0));
|
||||
assert(mathematics_get_is_equal(mathematics_root(0, 1), 0));
|
||||
assert(mathematics_get_is_equal(mathematics_root(2, 2), 1));
|
||||
assert(mathematics_get_is_equal(mathematics_root(27, 3), 3));
|
||||
assert(mathematics_get_is_equal(mathematics_root(16807, 5), 7));
|
||||
assert(mathematics_equals(mathematics_root(0, 0), 0));
|
||||
assert(mathematics_equals(mathematics_root(0, 1), 0));
|
||||
assert(mathematics_equals(mathematics_root(2, 2), 1));
|
||||
assert(mathematics_equals(mathematics_root(27, 3), 3));
|
||||
assert(mathematics_equals(mathematics_root(16807, 5), 7));
|
||||
}
|
||||
|
||||
void mathematics_square_root_test() {
|
||||
assert(mathematics_get_is_equal(mathematics_square_root(0), 0));
|
||||
assert(mathematics_get_is_equal(mathematics_square_root(1), 1));
|
||||
assert(mathematics_get_is_equal(mathematics_square_root(4), 2));
|
||||
assert(mathematics_get_is_equal(mathematics_square_root(9), 3));
|
||||
assert(mathematics_get_is_equal(mathematics_square_root(25), 5));
|
||||
assert(mathematics_get_is_equal(mathematics_square_root(100), 10));
|
||||
assert(mathematics_equals(mathematics_square_root(0), 0));
|
||||
assert(mathematics_equals(mathematics_square_root(1), 1));
|
||||
assert(mathematics_equals(mathematics_square_root(4), 2));
|
||||
assert(mathematics_equals(mathematics_square_root(9), 3));
|
||||
assert(mathematics_equals(mathematics_square_root(25), 5));
|
||||
assert(mathematics_equals(mathematics_square_root(100), 10));
|
||||
}
|
||||
|
||||
void mathematics_factorial_test() {
|
||||
|
@ -19,7 +19,7 @@ void string_test() {
|
||||
string_capitalize_test();
|
||||
string_total_occurrences_of_character_test();
|
||||
string_reverse_test();
|
||||
string_get_is_equal_test();
|
||||
string_equals_test();
|
||||
string_get_is_integer_test();
|
||||
string_split_test();
|
||||
string_join_test();
|
||||
@ -102,13 +102,13 @@ void string_reverse_test() {
|
||||
assert(assert_string_equal(string, "dlrow olleh"));
|
||||
}
|
||||
|
||||
void string_get_is_equal_test() {
|
||||
void string_equals_test() {
|
||||
char *string1 = "hello world";
|
||||
char *string2 = "dlrow olleh";
|
||||
char *string3 = "dlrow olleh";
|
||||
assert(!string_get_is_equal(string1, string2));
|
||||
assert(string_get_is_equal(string1, string1));
|
||||
assert(string_get_is_equal(string2, string3));
|
||||
assert(!string_equals(string1, string2));
|
||||
assert(string_equals(string1, string1));
|
||||
assert(string_equals(string2, string3));
|
||||
}
|
||||
|
||||
void string_get_is_integer_test() {
|
||||
|
@ -25,7 +25,7 @@ void string_total_occurrences_of_character_test();
|
||||
|
||||
void string_reverse_test();
|
||||
|
||||
void string_get_is_equal_test();
|
||||
void string_equals_test();
|
||||
|
||||
void string_get_is_integer_test();
|
||||
|
||||
|
Reference in New Issue
Block a user