diff --git a/CMakeLists.txt b/CMakeLists.txt index b4fc5bc..73de8a7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5) -set(BLT_VERSION 0.8.1) +set(BLT_VERSION 0.9.0) set(BLT_TEST_VERSION 0.0.1) project(BLT VERSION ${BLT_VERSION}) diff --git a/include/blt/std/map.h b/include/blt/std/map.h deleted file mode 100755 index 1b9a17e..0000000 --- a/include/blt/std/map.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Created by Brett on 13/01/23. - * Licensed under GNU General Public License V3.0 - * See LICENSE file for license detail - */ - -#ifndef BLT_TESTS_MAP_H -#define BLT_TESTS_MAP_H - -template> -class hashmap { - -}; - -#endif //BLT_TESTS_MAP_H diff --git a/include/blt/std/utility.h b/include/blt/std/utility.h new file mode 100644 index 0000000..cc994d6 --- /dev/null +++ b/include/blt/std/utility.h @@ -0,0 +1,36 @@ +/* + * + * Copyright (C) 2023 Brett Terpstra + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef BLT_UTILITY_H +#define BLT_UTILITY_H + +#include + +namespace blt +{ + + template + class enumerate + { + private: + + }; + +} + +#endif //BLT_UTILITY_H diff --git a/tests/include/utility_test.h b/tests/include/utility_test.h new file mode 100644 index 0000000..0d34909 --- /dev/null +++ b/tests/include/utility_test.h @@ -0,0 +1,27 @@ +/* + * + * Copyright (C) 2023 Brett Terpstra + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef BLT_UTILITY_TEST_H +#define BLT_UTILITY_TEST_H + +namespace blt::test::utility +{ + void run(); +} + +#endif //BLT_UTILITY_TEST_H diff --git a/tests/src/main.cpp b/tests/src/main.cpp index 6289f4a..327b560 100755 --- a/tests/src/main.cpp +++ b/tests/src/main.cpp @@ -13,6 +13,7 @@ //#include #include #include +#include std::function test{ [](int i) -> int { @@ -93,6 +94,7 @@ int main(int argc, const char** argv) .setMetavar("bytes") .setAction(blt::arg_action_t::STORE) .setNArgs('?').build()); + parser.addArgument(blt::arg_builder("--utility").setHelp("Run tests on utility functions").setAction(blt::arg_action_t::STORE_TRUE).build()); auto args = parser.parse_args(argc, argv); @@ -103,6 +105,9 @@ int main(int argc, const char** argv) blt::logging::setLogOutputFormat("[${{TIME}}] [${{LOG_LEVEL}}] (${{FILE}}:${{LINE}}) ${{STR}}\n"); } + if (args.contains("--utility")) + blt::test::utility::run(); + if (args.contains("--memory")) blt::test::memory::run(); diff --git a/tests/src/utility_test.cpp b/tests/src/utility_test.cpp new file mode 100644 index 0000000..9ba549b --- /dev/null +++ b/tests/src/utility_test.cpp @@ -0,0 +1,35 @@ +/* + * + * Copyright (C) 2023 Brett Terpstra + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include +#include + +std::optional get() +{ + return 10; +} + +void blt::test::utility::run() +{ + std::vector temp; + std::optional hi(10); + if (auto test = get()) + { + + } +}