microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
test/test_utils.cc
25lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | #include "gtest/gtest.h" |
| 5 | #include "test_utils.h" |
| 6 | #include "utils.h" |
| 7 | #include "re2/re2.h" |
| 8 | #include "nlohmann/json.hpp" |
| 9 | |
| 10 | |
| 11 | TEST(utils, make_string) { |
| 12 | std::string res = MakeString("a", "b", 0); |
| 13 | EXPECT_EQ(res, "ab0"); |
| 14 | } |
| 15 | |
| 16 | TEST(utils, re2_basic){ |
| 17 | re2::StringPiece piece("1234"); |
| 18 | re2::RE2 reg("[0-9]*"); |
| 19 | } |
| 20 | |
| 21 | TEST(utils, json){ |
| 22 | nlohmann::json j; |
| 23 | j.push_back("foo"); |
| 24 | EXPECT_EQ(j.size(), 1); |
| 25 | } |
| 26 | |