v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
24
source/test/assets_test.cpp
Normal file
24
source/test/assets_test.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include "StarAssets.hpp"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
using namespace Star;
|
||||
|
||||
TEST(AssetsTest, All) {
|
||||
EXPECT_EQ(AssetPath::removeDirectives("/foo/bar/baz??::?:??:asdfasdf??D?"), "/foo/bar/baz");
|
||||
EXPECT_EQ(AssetPath::directory("/foo/bar/baz"), "/foo/bar/");
|
||||
EXPECT_EQ(AssetPath::directory("foo/bar/baz"), "foo/bar/");
|
||||
EXPECT_EQ(AssetPath::directory("foo"), "");
|
||||
EXPECT_EQ(AssetPath::directory("/foo"), "/");
|
||||
EXPECT_EQ(AssetPath::filename(""), "");
|
||||
EXPECT_EQ(AssetPath::filename("foo"), "foo");
|
||||
EXPECT_EQ(AssetPath::filename("/foo"), "foo");
|
||||
EXPECT_EQ(AssetPath::filename("/foo/"), "");
|
||||
EXPECT_EQ(AssetPath::filename("/foo/bar"), "bar");
|
||||
|
||||
AssetPath compare = AssetPath{"/foo/bar/baz", String("baf"), {"whoa", "there"}};
|
||||
EXPECT_EQ(AssetPath::split("/foo/bar/baz:baf?whoa?there"), compare);
|
||||
|
||||
EXPECT_EQ(
|
||||
AssetPath::relativeTo("/foo/bar/baz:baf?whoa?there", "thing:sub?directive"), "/foo/bar/thing:sub?directive");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue