| 25 | WasmEdge::FileMgr Mgr; |
| 26 | |
| 27 | TEST(FileManagerTest, File__SetPath) { |
| 28 | // 1. Test opening data file. |
| 29 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readByteTest.bin")); |
| 30 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readU32Test.bin")); |
| 31 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readU32TestTooLong.bin")); |
| 32 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readU32TestTooLarge.bin")); |
| 33 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readU64Test.bin")); |
| 34 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readU64TestTooLong.bin")); |
| 35 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readU64TestTooLarge.bin")); |
| 36 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readS32Test.bin")); |
| 37 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readS32TestTooLong.bin")); |
| 38 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readS32TestTooLarge.bin")); |
| 39 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readS64Test.bin")); |
| 40 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readS64TestTooLong.bin")); |
| 41 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readS64TestTooLarge.bin")); |
| 42 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readF32Test.bin")); |
| 43 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readF64Test.bin")); |
| 44 | EXPECT_TRUE(Mgr.setPath("filemgrTestData/readNameTest.bin")); |
| 45 | EXPECT_FALSE(Mgr.setPath("filemgrTestData/NO_THIS_FILE.bin")); |
| 46 | EXPECT_TRUE(Mgr.setCode(std::vector<uint8_t>{0x00, 0xFF})); |
| 47 | } |
| 48 | |
| 49 | TEST(FileManagerTest, File__ReadByte) { |
| 50 | // 2. Test unsigned char reading. |
nothing calls this directly
no test coverage detected