()
| 101 | } |
| 102 | |
| 103 | @Test |
| 104 | public void testBenchmarkUInt8() throws Exception { |
| 105 | final String fileName = "bigbyte.mat"; |
| 106 | final String name = "bigbyte"; |
| 107 | final int SIZE = 1024; |
| 108 | |
| 109 | MLUInt8 mluint8 = new MLUInt8(name, new int[]{SIZE, SIZE}); |
| 110 | |
| 111 | // write array to file |
| 112 | ArrayList<MLArray> list = new ArrayList<MLArray>(); |
| 113 | list.add(mluint8); |
| 114 | |
| 115 | // write arrays to file |
| 116 | new MatFileWriter(getTempFile(fileName), list); |
| 117 | |
| 118 | // read array form file |
| 119 | MatFileReader mfr = new MatFileReader(getTempFile(fileName)); |
| 120 | MLArray mlArrayRetrived = mfr.getMLArray(name); |
| 121 | |
| 122 | for (int i = 0; i < mlArrayRetrived.getSize(); i++) { |
| 123 | ((MLNumericArray<?>) mlArrayRetrived).get(i); |
| 124 | } |
| 125 | |
| 126 | // test if MLArray objects are equal |
| 127 | assertEquals("Test if value red from file equals value stored", mluint8, mlArrayRetrived); |
| 128 | } |
| 129 | |
| 130 | @Test |
| 131 | public void testMultipleDimArrayRealFromMatlabCreatedFile() throws IOException { |
nothing calls this directly
no test coverage detected