MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/platform/file_system_test.cc:171–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171TEST(InterPlanetaryFileSystemTest, IPFSMatch) {
172 InterPlanetaryFileSystem ipfs;
173 EXPECT_EQ(Match(&ipfs, "thereisnosuchfile"), "");
174 EXPECT_EQ(Match(&ipfs, "*"),
175 "Earth,Jupiter,Mars,Mercury,Neptune,Saturn,Uranus,Venus");
176 // Returns Jupiter's moons.
177 EXPECT_EQ(Match(&ipfs, "Jupiter/*"),
178 "Jupiter/Europa,Jupiter/Ganymede,Jupiter/Io");
179 // Returns Jupiter's and Earth's moons.
180 EXPECT_EQ(Match(&ipfs, "*/*"),
181 "Earth/Moon,Jupiter/Europa,Jupiter/Ganymede,Jupiter/Io");
182 TF_EXPECT_OK(ipfs.CreateDir(io::JoinPath(kPrefix, "Planet0")));
183 TF_EXPECT_OK(ipfs.CreateDir(io::JoinPath(kPrefix, "Planet1")));
184 EXPECT_EQ(Match(&ipfs, "Planet[0-1]"), "Planet0,Planet1");
185 EXPECT_EQ(Match(&ipfs, "Planet?"), "Planet0,Planet1");
186}
187
188TEST(InterPlanetaryFileSystemTest, MatchSimple) {
189 InterPlanetaryFileSystem ipfs;

Callers

nothing calls this directly

Calls 7

MatchFunction · 0.70
JoinPathFunction · 0.50
CreateDirMethod · 0.45
RecursivelyCreateDirMethod · 0.45
codeMethod · 0.45
GetMatchingPathsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected