updated libraries
This commit is contained in:
parent
d5d5d000b3
commit
3b7e68065a
102 changed files with 3020 additions and 1624 deletions
|
|
@ -17,6 +17,19 @@
|
|||
#include "fl/hash_set.h"
|
||||
#include "fl/vector.h"
|
||||
|
||||
// Define an improved CHECK_CLOSE macro that provides better error messages
|
||||
#define CHECK_CLOSE(a, b, epsilon) \
|
||||
do { \
|
||||
float _a = (a); \
|
||||
float _b = (b); \
|
||||
float _diff = fabsf(_a - _b); \
|
||||
bool _result = _diff <= (epsilon); \
|
||||
if (!_result) { \
|
||||
printf("CHECK_CLOSE failed: |%f - %f| = %f > %f\n", (float)_a, \
|
||||
(float)_b, _diff, (float)(epsilon)); \
|
||||
} \
|
||||
CHECK(_result); \
|
||||
} while (0)
|
||||
|
||||
using namespace fl;
|
||||
|
||||
|
|
@ -80,9 +93,9 @@ namespace doctest {
|
|||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct StringMaker<fl::vector<T>> {
|
||||
static String convert(const fl::vector<T>& value) {
|
||||
template<typename T, typename Alloc>
|
||||
struct StringMaker<fl::vector<T, Alloc>> {
|
||||
static String convert(const fl::vector<T, Alloc>& value) {
|
||||
fl::Str out;
|
||||
out.append(value);
|
||||
return out.c_str();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue