Home
last modified time | relevance | path

Searched refs:mTestFile (Results 1 – 9 of 9) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/os/
DFileObserverTest.java35 private File mTestFile; field in FileObserverTest
62 mTestFile = File.createTempFile(".file_observer_test", ".txt"); in setUp()
67 if (mTestFile != null && mTestFile.exists()) { in tearDown()
68 mTestFile.delete(); in tearDown()
75 assertTrue(mTestFile.exists()); in testRun()
76 assertNotNull(mTestFile.getParent()); in testRun()
78 mObserver = new Observer(mTestFile.getParent()); in testRun()
81 FileOutputStream out = new FileOutputStream(mTestFile); in testRun()
87 mTestFile.delete(); in testRun()
DFileUtilsTest.java82 private File mTestFile; field in FileUtilsTest
95 mTestFile = new File(mDir, "test.file"); in setUp()
112 writeFile(mTestFile, TEST_DATA); in testCopyFile()
114 FileUtils.copyFile(mTestFile, mCopyFile); in testCopyFile()
236 writeFile(mTestFile, TEST_DATA); in testReadTextFile()
238 assertEquals(TEST_DATA, FileUtils.readTextFile(mTestFile, 0, null)); in testReadTextFile()
240 assertEquals("ABCDE", FileUtils.readTextFile(mTestFile, 5, null)); in testReadTextFile()
241 assertEquals("ABCDE<>", FileUtils.readTextFile(mTestFile, 5, "<>")); in testReadTextFile()
243 FileUtils.readTextFile(mTestFile, 51, "<>")); in testReadTextFile()
244 assertEquals(TEST_DATA, FileUtils.readTextFile(mTestFile, 52, "<>")); in testReadTextFile()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DKernelCpuProcStringReaderTest.java63 private File mTestFile; field in KernelCpuProcStringReaderTest
75 mTestFile = new File(mTestDir, "test.file"); in setUp()
76 mReader = new KernelCpuProcStringReader(mTestFile.getAbsolutePath()); in setUp()
106 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadErrorsLimit()
113 assertTrue(mTestFile.delete()); in testReadErrorsLimit()
120 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadErrorsLimit()
141 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadLine()
175 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testMultipleRead()
184 assertTrue(mTestFile.delete()); in testMultipleRead()
192 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadLineToArray()
[all …]
DStoragedUidIoStatsReaderTest.java53 private File mTestFile; field in StoragedUidIoStatsReaderTest
69 mTestFile = new File(mTestDir, "test.file"); in setUp()
70 mStoragedUidIoStatsReader = new StoragedUidIoStatsReader(mTestFile.getAbsolutePath()); in setUp()
95 BufferedWriter bufferedWriter = Files.newBufferedWriter(mTestFile.toPath()); in testReadExpected()
132 BufferedWriter bufferedWriter = Files.newBufferedWriter(mTestFile.toPath()); in testLineDoesNotElevenEntries()
155 BufferedWriter bufferedWriter = Files.newBufferedWriter(mTestFile.toPath()); in testLineIsMalformed()
DKernelCpuUidUserSysTimeReaderTest.java55 private File mTestFile; field in KernelCpuUidUserSysTimeReaderTest
77 mTestFile = new File(mTestDir, "test.file"); in setUp()
79 new KernelCpuProcStringReader(mTestFile.getAbsolutePath()), false); in setUp()
92 new KernelCpuProcStringReader(mTestFile.getAbsolutePath()), true); in testThrottler()
161 assertTrue(mTestFile.delete()); in testReadDelta()
185 assertTrue(mTestFile.delete()); in testReadDeltaWrongData()
208 assertTrue(mTestFile.delete()); in testReadAbsolute()
224 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in writeToFile()
DKernelCpuUidFreqTimeReaderTest.java61 private File mTestFile; field in KernelCpuUidFreqTimeReaderTest
89 mTestFile = new File(mTestDir, "test.file"); in setUp()
91 mReader = new KernelCpuUidFreqTimeReader(mTestFile.getAbsolutePath(), in setUp()
92 new KernelCpuProcStringReader(mTestFile.getAbsolutePath()), mBpfMapReader, false); in setUp()
113 mReader = new KernelCpuUidFreqTimeReader(mTestFile.getAbsolutePath(), in testReadFreqs_perClusterTimesNotAvailable()
114 … new KernelCpuProcStringReader(mTestFile.getAbsolutePath()), mBpfMapReader, false); in testReadFreqs_perClusterTimesNotAvailable()
141 mReader = new KernelCpuUidFreqTimeReader(mTestFile.getAbsolutePath(), in testReadFreqs_perClusterTimesAvailable()
142 … new KernelCpuProcStringReader(mTestFile.getAbsolutePath()), mBpfMapReader, false); in testReadFreqs_perClusterTimesAvailable()
322 assertTrue(mTestFile.delete()); in clearFreqsAndData()
356 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in writeToFile()
DKernelCpuUidActiveTimeReaderTest.java56 private File mTestFile; field in KernelCpuUidActiveTimeReaderTest
83 mTestFile = new File(mTestDir, "test.file"); in setUp()
86 new KernelCpuProcStringReader(mTestFile.getAbsolutePath()), mBpfMapReader, false); in setUp()
245 assertTrue(mTestFile.delete()); in clearCpusAndData()
262 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in writeToFile()
DKernelCpuUidClusterTimeReaderTest.java57 private File mTestFile; field in KernelCpuUidClusterTimeReaderTest
85 mTestFile = new File(mTestDir, "test.file"); in setUp()
88 new KernelCpuProcStringReader(mTestFile.getAbsolutePath()), mBpfMapReader, in setUp()
247 assertTrue(mTestFile.delete()); in clearCoresAndData()
270 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in writeToFile()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/metrics/
DPersistAtomsStorageTest.java79 private File mTestFile; field in PersistAtomsStorageTest
312 mTestFile = mFolder.newFile(TEST_FILE); in setUp()
314 doReturn(mTestFile).when(mContext).getFileStreamPath(anyString()); in setUp()
319 mTestFile.delete(); in tearDown()
326 mTestFile.delete(); in loadAtoms_fileNotExist()
350 mTestFile.setReadable(false); in loadAtoms_unreadable()
396 FileOutputStream stream = new FileOutputStream(mTestFile); in loadAtoms_malformedFile()
700 FileOutputStream stream = new FileOutputStream(mTestFile); in createEmptyTestFile()
711 FileOutputStream stream = new FileOutputStream(mTestFile); in createTestFile()