Merge branch 'master' into multi-config-support

This commit is contained in:
Axel Kohlmeyer
2021-09-20 20:42:03 -04:00
414 changed files with 2160 additions and 2577 deletions

View File

@ -14,8 +14,11 @@
#include "lmptype.h"
#include "pointers.h"
#include "utils.h"
#include "tokenizer.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <cerrno>
#include <cstdio>
#include <string>
@ -875,6 +878,19 @@ TEST(Utils, date2num)
ASSERT_EQ(utils::date2num("31December100"), 1001231);
}
TEST(Utils, current_date)
{
auto vals = ValueTokenizer(utils::current_date(),"-");
int year = vals.next_int();
int month = vals.next_int();
int day = vals.next_int();
ASSERT_GT(year,2020);
ASSERT_GE(month,1);
ASSERT_GE(day,1);
ASSERT_LE(month,12);
ASSERT_LE(day,31);
}
TEST(Utils, binary_search)
{
double data[] = {-2.0, -1.8, -1.0, -1.0, -1.0, -0.5, -0.2, 0.0, 0.1, 0.1,