Home
last modified time | relevance | path

Searched refs:testFile (Results 1 – 25 of 88) sorted by relevance

1234

/external/apache-harmony/luni/src/test/api/unix/org/apache/harmony/luni/tests/java/io/
DUnixFileTest.java44 private File testFile; field in UnixFileTest
128 assertFalse(testFile.canExecute()); in test_canExecute()
129 assertTrue(testFile.setExecutable(true, false)); in test_canExecute()
130 assertTrue(testFile.canExecute()); in test_canExecute()
131 assertTrue(testFile.setExecutable(true, true)); in test_canExecute()
132 assertTrue(testFile.canExecute()); in test_canExecute()
134 assertTrue(testFile.setExecutable(false, false)); in test_canExecute()
135 assertFalse(testFile.canExecute()); in test_canExecute()
136 assertTrue(testFile.setExecutable(false, true)); in test_canExecute()
137 assertFalse(testFile.canExecute()); in test_canExecute()
[all …]
/external/apache-commons-io/src/test/java/org/apache/commons/io/
DLineIteratorTest.java117 final File testFile = new File(temporaryFolder, fileName); in doTestFileWithSpecifiedLines() local
118 final List<String> lines = createLinesFile(testFile, encoding, lineCount); in doTestFileWithSpecifiedLines()
120 try (LineIterator iterator = FileUtils.lineIterator(testFile, encoding)) { in doTestFileWithSpecifiedLines()
142 final File testFile = new File(temporaryFolder, "LineIterator-closeEarly.txt");
143 createLinesFile(testFile, encoding, 3);
145 try (LineIterator iterator = FileUtils.lineIterator(testFile, encoding)) {
204 final File testFile = new File(temporaryFolder, fileName);
205 final List<String> lines = createLinesFile(testFile, encoding, 9);
207 final Reader reader = new BufferedReader(Files.newBufferedReader(testFile.toPath()));
216 final File testFile = new File(temporaryFolder, fileName);
[all …]
DFileCleaningTrackerTest.java48 private File testFile; field in FileCleaningTrackerTest
53 return RandomAccessFileMode.READ_WRITE.create(testFile); in createRandomAccessFile()
70 testFile = new File(tempDirFile, "file-test.txt"); in setUp()
106 TestUtils.createFile(testFile, 100); in testFileCleanerDirectory()
107 assertTrue(testFile.exists()); in testFileCleanerDirectory()
120 assertTrue(testFile.exists()); // not deleted, as dir not empty in testFileCleanerDirectory()
121 assertTrue(testFile.getParentFile().exists()); // not deleted, as dir not empty in testFileCleanerDirectory()
126 if (!testFile.getParentFile().exists()) { in testFileCleanerDirectory_ForceStrategy()
127 throw new IOException("Cannot create file " + testFile in testFileCleanerDirectory_ForceStrategy()
131 new BufferedOutputStream(Files.newOutputStream(testFile.toPath()))) { in testFileCleanerDirectory_ForceStrategy()
[all …]
DFileUtilsCopyToFileTest.java56 private File testFile; field in FileUtilsCopyToFileTest
62 testFile = new File(temporaryFolder, "file1-test.txt"); in setUp()
63 if(!testFile.getParentFile().exists()) { in setUp()
64 throw new IOException("Cannot create file " + testFile + in setUp()
81 FileUtils.copyInputStreamToFile(inputStream, testFile); in testCopyInputStreamToFile()
96 FileUtils.copyToFile(inputStream, testFile); in testCopyToFile()
DFileUtilsTest.java192 private void backDateFile10Minutes(final File testFile) throws IOException { in backDateFile10Minutes() argument
194 final long lastModified1 = getLastModifiedMillis(testFile); in backDateFile10Minutes()
195 assertTrue(setLastModifiedMillis(testFile, lastModified1 - mins10)); in backDateFile10Minutes()
197 …assertNotEquals(getLastModifiedMillis(testFile), lastModified1, "Should have changed source date"); in backDateFile10Minutes()
321 private boolean setLastModifiedMillis(final File testFile, final long millis) {
322 return testFile.setLastModified(millis);
1376 final File testFile = new File(testDirectory, "testDeleteQuietlyFile");
1378 if (!testFile.getParentFile().exists()) {
1379 fail("Cannot create file " + testFile
1382 …try (final OutputStream output = new BufferedOutputStream(Files.newOutputStream(testFile.toPath())…
[all …]
/external/apache-commons-io/src/test/java/org/apache/commons/io/output/
DDeferredFileOutputStreamTest.java70 final File testFile = new File("testAboveThreshold.dat"); in testAboveThreshold() local
73 testFile.delete(); in testAboveThreshold()
75 …utputStream dfos = new DeferredFileOutputStream(testBytes.length - 5, initialBufferSize, testFile); in testAboveThreshold()
81 verifyResultFile(testFile); in testAboveThreshold()
84 testFile.delete(); in testAboveThreshold()
95 final File testFile = tempDir.resolve("testAboveThreshold.dat").toFile(); in testAboveThresholdGetInputStream() local
98 testFile); in testAboveThresholdGetInputStream()
107 verifyResultFile(testFile); in testAboveThresholdGetInputStream()
258 final File testFile = new File("testThresholdReached.dat"); in testThresholdReached() local
261 testFile.delete(); in testThresholdReached()
[all …]
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/ast/
DCompilationUnitTest.java48 … Path testFile = sourceRoot.resolve(Paths.get("com", "github", "javaparser", "storage", "Z.java")); in testGetSourceRoot() local
50 CompilationUnit cu = parse(testFile); in testGetSourceRoot()
59 … Path testFile = sourceRoot.resolve(Paths.get("com", "github", "javaparser", "storage", "A.java")); in testGetSourceRootWithBadPackageDeclaration()
60 CompilationUnit cu = parse(testFile); in testGetSourceRootWithBadPackageDeclaration()
69 Path testFile = sourceRoot.resolve(Paths.get("B.java")); in testGetSourceRootInDefaultPackage() local
71 CompilationUnit cu = parse(testFile); in testGetSourceRootInDefaultPackage()
79 …Path testFile = sourceRoot.resolve(Paths.get("com", "github", "javaparser", "storage", "PrimaryTyp… in testGetPrimaryTypeName() local
80 CompilationUnit cu = parse(testFile); in testGetPrimaryTypeName()
94 …Path testFile = sourceRoot.resolve(Paths.get("com", "github", "javaparser", "storage", "PrimaryTyp… in testGetPrimaryType() local
95 CompilationUnit cu = parse(testFile); in testGetPrimaryType()
[all …]
/external/clang/utils/analyzer/
Dupdate_plist_test.pl7 my $testFile = shift @ARGV;
8 die "error: cannot read file $testFile\n" if (! -r $testFile);
18 open (IN, $testFile) or die "cannot open $testFile\n";
50 `cp $filename $testFile`;
51 print "updated $testFile\n";
/external/skia/tests/
DSkSLES2ConformanceTest.cpp40 static void test_expect_fail(skiatest::Reporter* r, const char* testFile) { in test_expect_fail() argument
42 sk_sp<SkData> shaderData = GetResourceAsData(testFile); in test_expect_fail()
44 ERRORF(r, "%s: Unable to load file", SkOSPath::Basename(testFile).c_str()); in test_expect_fail()
52 SkOSPath::Basename(testFile).c_str()); in test_expect_fail()
57 static void test_expect_pass(skiatest::Reporter* r, SkSurface* surface, const char* testFile) { in test_expect_pass() argument
59 sk_sp<SkData> shaderData = GetResourceAsData(testFile); in test_expect_pass()
61 ERRORF(r, "%s: Unable to load file", testFile); in test_expect_pass()
68 ERRORF(r, "%s: %s", testFile, result.errorText.c_str()); in test_expect_pass()
75 ERRORF(r, "%s: Unable to build shader", testFile); in test_expect_pass()
93 testFile, in test_expect_pass()
DSkSLErrorTest.cpp63 const char* testFile, in check_expected_errors() argument
75 SkOSPath::Basename(testFile).c_str(), expectedError.c_str()); in check_expected_errors()
87 SkOSPath::Basename(testFile).c_str(), originalErrors.c_str()); in check_expected_errors()
91 static void test_expect_fail(skiatest::Reporter* r, const char* testFile, SkSL::ProgramKind kind) { in test_expect_fail() argument
119 if (kTestsToSkip->contains(testFile)) { in test_expect_fail()
120 INFOF(r, "%s: skipped in SK_ENABLE_OPTIMIZE_SIZE mode", testFile); in test_expect_fail()
124 sk_sp<SkData> shaderData = GetResourceAsData(testFile); in test_expect_fail()
126 ERRORF(r, "%s: Unable to load file", SkOSPath::Basename(testFile).c_str()); in test_expect_fail()
144 SkOSPath::Basename(testFile).c_str()); in test_expect_fail()
148 check_expected_errors(r, testFile, expectedErrors, compiler.errorText()); in test_expect_fail()
DSkSLTest.cpp198 const char* testFile, in load_source() argument
200 SkString resourcePath = SkStringPrintf("sksl/%s", testFile); in load_source()
203 ERRORF(r, "%s%s: Unable to load file", testFile, permutationSuffix); in load_source()
211 const char* testFile, in test_one_permutation() argument
214 SkString shaderString = load_source(r, testFile, permutationSuffix); in test_one_permutation()
220 ERRORF(r, "%s%s: %s", testFile, permutationSuffix, result.errorText.c_str()); in test_one_permutation()
226 ERRORF(r, "%s%s: Unable to build shader", testFile, permutationSuffix); in test_one_permutation()
265 const char* testFile, in test_permutations() argument
270 test_one_permutation(r, surface, testFile, "", options); in test_permutations()
273 test_one_permutation(r, surface, testFile, " (Unoptimized)", options); in test_permutations()
[all …]
/external/cronet/third_party/icu/source/test/intltest/
Ducaconf.cpp29 testFile(NULL), in UCAConformanceTest()
55 if (testFile) { in ~UCAConformanceTest()
56 fclose(testFile); in ~UCAConformanceTest()
112 if(testFile) { in openTestFile()
113 fclose(testFile); in openTestFile()
128 testFile = fopen(buffer, "rb"); in openTestFile()
130 if(testFile == 0) { in openTestFile()
133 testFile = fopen(buffer, "rb"); in openTestFile()
135 if(testFile == 0) { in openTestFile()
138 testFile = fopen(buffer, "rb"); in openTestFile()
[all …]
/external/icu/icu4c/source/test/intltest/
Ducaconf.cpp29 testFile(NULL), in UCAConformanceTest()
55 if (testFile) { in ~UCAConformanceTest()
56 fclose(testFile); in ~UCAConformanceTest()
112 if(testFile) { in openTestFile()
113 fclose(testFile); in openTestFile()
128 testFile = fopen(buffer, "rb"); in openTestFile()
130 if(testFile == 0) { in openTestFile()
133 testFile = fopen(buffer, "rb"); in openTestFile()
135 if(testFile == 0) { in openTestFile()
138 testFile = fopen(buffer, "rb"); in openTestFile()
[all …]
/external/downloader/src/test/java/com/google/android/downloader/
DIOUtilTest.java47 File testFile = temporaryFolder.newFile(); in validateChannel_notOpen() local
48 FileChannel channel = FileChannel.open(testFile.toPath()); in validateChannel_notOpen()
56 File testFile = temporaryFolder.newFile(); in validateChannel_valid() local
57 FileChannel channel = FileChannel.open(testFile.toPath()); in validateChannel_valid()
64 File testFile = temporaryFolder.newFile(); in blockingWrite() local
66 FileChannel channel = FileChannel.open(testFile.toPath(), StandardOpenOption.WRITE); in blockingWrite()
71 assertThat(Files.asCharSource(testFile, UTF_8).read()).isEqualTo(message); in blockingWrite()
/external/smali/smalidea/src/test/java/org/jf/smalidea/findUsages/
DFindUsagesTest.java112 for (TestFile testFile: testFiles) { in doTest()
113 int refIndex = testFile.getRefIndex(); in doTest()
115 PsiElement element = testFile.psiFile.findElementAt(refIndex); in doTest()
128 reference = testFile.psiFile.findReferenceAt(refIndex); in doTest()
133 testFile.psiFile.findElementAt(refIndex), 0); in doTest()
143 for (TestFile testFile: testFiles) { in doTest()
144 assertUsages(testFile, usages); in doTest()
148 private void assertUsages(@NotNull TestFile testFile, @NotNull Collection<UsageInfo> usages) { in assertUsages() argument
151 if (usage.getFile().getName().equals(testFile.fileName)) { in assertUsages()
156 for (Integer usageIndex: testFile.getUsageIndices()) { in assertUsages()
/external/cronet/buildtools/third_party/libc++/trunk/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/
Dctor.pass.cpp99 path const testFile = testDir / "testFile"; in access_denied_test_case() local
101 env.create_file(testFile, 42); in access_denied_test_case()
142 path const testFile = testDir / "inaccessible_file"; in access_denied_to_file_test_case() local
145 path const testFile = env.make_env_path("file1"); in access_denied_to_file_test_case() local
146 env.create_file(testFile, 42); in access_denied_to_file_test_case()
149 permissions(testFile, perms::none); in access_denied_to_file_test_case()
156 RDI it(testFile, ec); in access_denied_to_file_test_case()
164 RDI it(testFile, directory_options::skip_permission_denied, ec); in access_denied_to_file_test_case()
214 const path testFile = static_env.File; in test_open_on_file_fails() local
218 RDI it(testFile, ec); in test_open_on_file_fails()
[all …]
/external/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/
Dctor.pass.cpp93 path const testFile = testDir / "testFile"; in TEST_CASE() local
95 env.create_file(testFile, 42); in TEST_CASE()
129 path const testFile = env.make_env_path("file1"); in TEST_CASE() local
130 env.create_file(testFile, 42); in TEST_CASE()
133 permissions(testFile, perms::none); in TEST_CASE()
139 RDI it(testFile, ec); in TEST_CASE()
147 RDI it(testFile, directory_options::skip_permission_denied, ec); in TEST_CASE()
195 const path testFile = StaticEnv::File; in TEST_CASE() local
199 RDI it(testFile, ec); in TEST_CASE()
204 TEST_CHECK_THROW(filesystem_error, RDI(testFile)); in TEST_CASE()
/external/cronet/buildtools/third_party/libc++/trunk/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/
Dctor.pass.cpp98 path const testFile = testDir / "testFile"; in access_denied_test_case() local
100 env.create_file(testFile, 42); in access_denied_test_case()
134 path const testFile = env.make_env_path("file1"); in access_denied_to_file_test_case() local
135 env.create_file(testFile, 42); in access_denied_to_file_test_case()
138 permissions(testFile, perms::none); in access_denied_to_file_test_case()
144 directory_iterator it(testFile, ec); in access_denied_to_file_test_case()
152 directory_iterator it(testFile, directory_options::skip_permission_denied, ec); in access_denied_to_file_test_case()
202 const path testFile = static_env.File; in test_open_on_file_fails() local
206 directory_iterator it(testFile, ec); in test_open_on_file_fails()
211 TEST_THROWS_TYPE(filesystem_error, directory_iterator(testFile)); in test_open_on_file_fails()
/external/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/
Dctor.pass.cpp92 path const testFile = testDir / "testFile"; in TEST_CASE() local
94 env.create_file(testFile, 42); in TEST_CASE()
127 path const testFile = env.make_env_path("file1"); in TEST_CASE() local
128 env.create_file(testFile, 42); in TEST_CASE()
131 permissions(testFile, perms::none); in TEST_CASE()
137 directory_iterator it(testFile, ec); in TEST_CASE()
145 directory_iterator it(testFile, directory_options::skip_permission_denied, ec); in TEST_CASE()
193 const path testFile = StaticEnv::File; in TEST_CASE() local
197 directory_iterator it(testFile, ec); in TEST_CASE()
202 TEST_CHECK_THROW(filesystem_error, directory_iterator(testFile)); in TEST_CASE()
/external/cldr/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/
DTestFactory.java20 CLDRFile testFile = new CLDRFile(mySource);
21 addFile(testFile);
24 public void addFile(CLDRFile testFile) { in addFile() argument
25 final String localeID = testFile.getLocaleID(); in addFile()
26 unresolved.put(localeID, testFile); in addFile()
/external/toybox/tests/
Dchattr.test54 echo "$_t" > testFile && chattr +$attr testFile 2>/dev/null || ((++SKIP))
73 touch testFile && chattr -v 1234 testFile 2>/dev/null || ((++SKIP))
/external/golang-protobuf/internal/filedesc/
Dbuild_test.go22 var testFile = new(testpb.TestAllTypes).ProtoReflect().Descriptor().ParentFile() var
31 got := protodesc.ToFileDescriptorProto(testFile)
86 d := testFile.Messages().ByName("TestAllTypes").Fields().ByName("map_int32_int32").Message()
115 fd1 := testFile.Messages().ByName("TestWeak").Fields().ByName("weak_message1")
127 fd2 := testFile.Messages().ByName("TestWeak").Fields().ByName("weak_message2")
/external/icu/icu4c/source/test/iotest/
Diotest.cpp223 LocalUFILEPointer testFile; in DataDrivenPrintf() local
237 testFile.adoptInstead(u_fopen(STANDARD_TEST_FILE, "w", fileLocale, "UTF-8")); in DataDrivenPrintf()
238 if (testFile.isNull()) { in DataDrivenPrintf()
263 uFileBufferLenReturned = u_fprintf_u(testFile.getAlias(), format, dbl); in DataDrivenPrintf()
268 uFileBufferLenReturned = u_fprintf_u(testFile.getAlias(), format, i8); in DataDrivenPrintf()
273 uFileBufferLenReturned = u_fprintf_u(testFile.getAlias(), format, i16); in DataDrivenPrintf()
278 uFileBufferLenReturned = u_fprintf_u(testFile.getAlias(), format, i32); in DataDrivenPrintf()
283 uFileBufferLenReturned = u_fprintf_u(testFile.getAlias(), format, i64); in DataDrivenPrintf()
288 uFileBufferLenReturned = u_fprintf_u(testFile.getAlias(), format, cBuffer); in DataDrivenPrintf()
292 uFileBufferLenReturned = u_fprintf_u(testFile.getAlias(), format, argument); in DataDrivenPrintf()
[all …]
/external/apache-commons-io/src/test/java/org/apache/commons/io/filefilter/
DFileFilterTest.java257 final File testFile = new File("test.txt"); in testDelegateFileFilter() local
260 assertFiltering(filter, testFile, false); in testDelegateFileFilter()
264 assertFiltering(filter, testFile, false); in testDelegateFileFilter()
464 final File testFile = new File("foo.test"); in testFileFilterUtils_or() local
465 assertFiltering(FileFilterUtils.or(trueFilter, trueFilter), testFile, true); in testFileFilterUtils_or() local
466 assertFiltering(FileFilterUtils.or(trueFilter, trueFilter, falseFilter), testFile, true); in testFileFilterUtils_or() local
467 assertFiltering(FileFilterUtils.or(falseFilter, trueFilter), testFile, true); in testFileFilterUtils_or() local
468 assertFiltering(FileFilterUtils.or(falseFilter, falseFilter, falseFilter), testFile, false); in testFileFilterUtils_or() local
1078 final File testFile = new File("foo.test"); in testOr() local
1079 final Path testPath = testFile.toPath(); in testOr()
[all …]
/external/apache-velocity-engine/velocity-engine-core/src/test/java/org/apache/velocity/test/
DEvaluateTestCase.java109 testFile("eval1", props); in testEvaluate()
120 testFile("eval2", properties); in testEvaluateMacroPreserve()
123 testFile("eval2", properties); in testEvaluateMacroPreserve()
133 testFile("evalvmcontext", new HashMap()); in testEvaluateVMContext()
254 private void testFile(String basefilename, Map<String, Object> properties) in testFile() method in EvaluateTestCase

1234