-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1b6a83
commit f3194dd
Showing
16 changed files
with
290 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: ren-nasr <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/06 11:42:52 by ren-nasr #+# #+# */ | ||
/* Updated: 2022/10/08 22:12:53 by ren-nasr ### ########.fr */ | ||
/* Updated: 2022/10/24 20:48:11 by ren-nasr ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -22,5 +22,6 @@ void ft_enable_if_tests_suite() | |
REQUIRE_EQ(a, 1, test_name, "enable_if<true, int>::type should be int"); | ||
REQUIRE_STREQ(typeid(ft::enable_if<true, int>::type).name(), typeid(int).name(), test_name, "enable_if<true, int>::type should be of type int"); | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: ren-nasr <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/08 22:21:47 by ren-nasr #+# #+# */ | ||
/* Updated: 2022/10/08 22:25:10 by ren-nasr ### ########.fr */ | ||
/* Updated: 2022/10/24 20:48:07 by ren-nasr ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -32,6 +32,7 @@ void ft_equal_tests_suite() { | |
a[5] = 4; | ||
REQUIRE_EQ(ft::equal(a.begin(), a.end(), b.begin()), false, test_name, "equal should return false if the two sequences are not equal"); | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
/*** predicate ***/ | ||
|
@@ -52,8 +53,7 @@ void ft_equal_tests_suite() { | |
a[5] = 4; | ||
REQUIRE_EQ(ft::equal(a.begin(), a.end(), b.begin(), std::equal_to<int>()), false, test_name, "equal should return false if the two sequences are not equal"); | ||
INFO_OK(test_name); | ||
|
||
|
||
//sleep(1); | ||
} | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: ren-nasr <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/08 22:11:11 by ren-nasr #+# #+# */ | ||
/* Updated: 2022/10/08 22:16:46 by ren-nasr ### ########.fr */ | ||
/* Updated: 2022/10/24 20:48:00 by ren-nasr ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -45,6 +45,7 @@ void ft_is_integral_tests_suite() { | |
REQUIRE_EQ(ft::is_integral<unsigned int>::value, true, test_name, "is_integral<unsigned int>::value should be true"); | ||
REQUIRE_EQ(ft::is_integral<unsigned long long int>::value, true, test_name, "is_integral<unsigned long long int>::value should be true"); | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: ren-nasr <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/08 21:48:04 by ren-nasr #+# #+# */ | ||
/* Updated: 2022/10/08 22:04:10 by ren-nasr ### ########.fr */ | ||
/* Updated: 2022/10/24 20:47:38 by ren-nasr ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -31,6 +31,7 @@ void ft_lexico_compare_tests_suite() | |
a[5] = 4; | ||
REQUIRE_EQ(ft::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end()), true, test_name, "lexicographical_compare should return true if the first sequence is less than the second"); | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
}; | ||
|
||
/*********************************************************/ | ||
|
@@ -51,6 +52,7 @@ void ft_lexico_compare_tests_suite() | |
a[5] = 4; | ||
REQUIRE_EQ(ft::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end(), ft::less<int>()), true, test_name, "lexicographical_compare should return true if the first sequence is less than the second"); | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
}; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: ren-nasr <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/19 19:15:17 by ren-nasr #+# #+# */ | ||
/* Updated: 2022/10/24 18:22:01 by ren-nasr ### ########.fr */ | ||
/* Updated: 2022/10/24 20:47:23 by ren-nasr ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -38,6 +38,7 @@ void ft_map_tests_suite() | |
REQUIRE_EQ(typeid(ft::map<std::vector<char>, std::string>::difference_type), typeid(std::ptrdiff_t), test_name, "`difference_type` member types is missing or invalid"); | ||
REQUIRE_EQ(typeid(ft::map<std::vector<char>, std::string>::size_type), typeid(std::size_t), test_name, "`size_type` member types is missing or invalid"); | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
/******************************************************************************/ | ||
|
@@ -109,6 +110,7 @@ void ft_map_tests_suite() | |
REQUIRE_EQ(a, m5.get_allocator(), test_name, "`get_allocator()` member function should return the same value as it's copy ctor"); | ||
|
||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
|
||
|
@@ -138,6 +140,7 @@ void ft_map_tests_suite() | |
++it; | ||
} | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
|
||
|
@@ -161,6 +164,7 @@ void ft_map_tests_suite() | |
ft::map<int, int>::size_type max_size = m1.get_allocator().max_size(); | ||
REQUIRE_EQ(max_size, m1.max_size(), test_name, "`max_size()` member function should return the same value as std::map"); | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
/******************************************************************************/ | ||
|
@@ -294,6 +298,7 @@ void ft_map_tests_suite() | |
REQUIRE_EQ(m4.empty(), m5.empty(), test_name, "`swap()` member function should swap the map"); | ||
|
||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
/* ************************************************************************** */ | ||
|
@@ -336,6 +341,7 @@ void ft_map_tests_suite() | |
REQUIRE_EQ(p2.second->first, 2, test_name, "`equal_range()` member function should return the iterator to the element if found"); | ||
|
||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
/* ************************************************************************** */ | ||
|
@@ -380,6 +386,7 @@ void ft_map_tests_suite() | |
} | ||
|
||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
/* ************************************************************************** */ | ||
|
@@ -405,6 +412,7 @@ void ft_map_tests_suite() | |
REQUIRE_EQ(vc(p2, p2), false, test_name, "`value_comp()` member function should return the value comparison object"); | ||
|
||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
/* ************************************************************************** */ | ||
/* non-member functions */ | ||
|
@@ -477,5 +485,6 @@ void ft_map_tests_suite() | |
REQUIRE_EQ(m4[i], i, test_name, "`swap` non-member function should swap the contents of the two maps"); | ||
} | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: ren-nasr <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/08 17:31:19 by ren-nasr #+# #+# */ | ||
/* Updated: 2022/10/08 18:23:05 by ren-nasr ### ########.fr */ | ||
/* Updated: 2022/10/24 20:47:12 by ren-nasr ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -27,6 +27,7 @@ void ft_pair_tests_suite() { | |
REQUIRE_STREQ(typeid(a).name(), typeid(int).name(), test_name, "first_type should be of type int"); | ||
REQUIRE_STREQ(typeid(b).name(), typeid(char).name(), test_name, "second_type should be of type char"); | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
/* ************************************************************************** */ | ||
|
@@ -58,6 +59,7 @@ void ft_pair_tests_suite() { | |
REQUIRE_EQ(c.first, 1, test_name, "operator= should initialize first to other.first, `first = other.first`"); | ||
REQUIRE_EQ(c.second, 'a', test_name, "operator= should initialize second to other.second, `second = other.second`"); | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
// free(test_name); | ||
// relational operators | ||
|
@@ -75,6 +77,7 @@ void ft_pair_tests_suite() { | |
REQUIRE_GE(a, b, test_name, "operator>= should return true if `first` is greater than `first` of other"); | ||
REQUIRE_LE(a, b, test_name, "operator<= should return true if `first` is less than `first` of other"); | ||
INFO_OK(test_name); | ||
//sleep(1); | ||
} | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: ren-nasr <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/09/30 11:49:06 by ren-nasr #+# #+# */ | ||
/* Updated: 2022/10/24 18:10:58 by ren-nasr ### ########.fr */ | ||
/* Updated: 2022/10/24 20:42:48 by ren-nasr ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -21,7 +21,7 @@ void ft_run_all_tests() | |
ft_enable_if_tests_suite(); | ||
ft_is_integral_tests_suite(); | ||
ft_equal_tests_suite(); | ||
ft_avlnode_tests_suite(); | ||
|
||
ft_map_tests_suite(); | ||
ft_benchmarking_tests_suite(); | ||
} | ||
|
@@ -45,8 +45,6 @@ int main(int argc, char** argv) | |
ft_run_all_tests(); | ||
else if (strcmp(argv[1], "vector") == 0) | ||
ft_vector_tests_suite(); | ||
else if (strcmp(argv[1], "reverse_iterator") == 0) | ||
ft_reverse_iterator_tests_suite(); | ||
else if (strcmp(argv[1], "enable_if") == 0) | ||
ft_enable_if_tests_suite(); | ||
else if (strcmp(argv[1], "pair") == 0) | ||
|
@@ -59,8 +57,7 @@ int main(int argc, char** argv) | |
ft_is_integral_tests_suite(); | ||
else if (strcmp(argv[1], "equal") == 0) | ||
ft_equal_tests_suite(); | ||
else if (strcmp(argv[1], "avlnode") == 0) | ||
ft_avlnode_tests_suite(); | ||
|
||
else if (strcmp(argv[1], "map") == 0) | ||
ft_map_tests_suite(); | ||
else if (strcmp(argv[1], "benchmark") == 0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.