Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
270,800 | String () { return "FSRecord{" + "id=" + id + ", parentRef=" + parentRef + ", nameRef=" + nameRef + ", flags=" + flags + ", attributeRef=" + attributeRef + ", contentRef=" + contentRef + ", timestamp=" + timestamp + ", length=" + length + ", modCount=" + modCount + '}'; } | toString |
270,801 | FSRecord (final int recordId) { final ThreadLocalRandom rnd = ThreadLocalRandom.current(); return new FSRecord( recordId, rnd.nextInt(0, recordId), rnd.nextInt(1, Integer.MAX_VALUE),//nameId should be >0 rnd.nextInt(), rnd.nextInt(0, Integer.MAX_VALUE),//attributeRecordId should be >=0 rnd.nextInt(0, Integer.MAX_VALUE)... | generateRecordFields |
270,802 | void (final String message, final FSRecord recordOriginal, final FSRecord recordReadBack) { assertTrue(message + "\n" + "\toriginal: " + recordOriginal + "\n" + "\tread back: " + recordReadBack + "\n", recordOriginal.equalsExceptModCount(recordReadBack)); } | assertEqualExceptModCount |
270,803 | List<Object[]> () { final ArrayList<Object[]> storages = new ArrayList<>(); storages.add(new Object[]{false}); if (PageCacheUtils.LOCK_FREE_PAGE_CACHE_ENABLED) { storages.add(new Object[]{true}); } return storages; } | storagesToTest |
270,804 | void () { PropertyChecker.customized() .withIterationCount(ITERATION_COUNT) .withSizeHint(iterNo -> 10 * iterNo) //.printRawData() //.printGeneratedValues() .checkScenarios(() -> { return env -> { final Attributes attributes = new Attributes(); try (AttributesStorageOverBlobStorage storage = createStorage(temporaryFold... | insertsUpdatesDeletesAttributesInAnyOrderCreateCoherentStorageBehaviour |
270,805 | void (final @NotNull ImperativeCommand.Environment env) { try { while (true) { final int fileId = env.generateValue(Generator.integers(0, Integer.MAX_VALUE), "Generated fileId: %s"); final int attributeId = env.generateValue(Generator.integers(0, AbstractAttributesStorage.MAX_ATTRIBUTE_ID), "Generated attributeId: %s")... | performCommand |
270,806 | void (final @NotNull ImperativeCommand.Environment env) { try { if (!records.isEmpty()) { final int recordIndex = env.generateValue(Generator.integers(0, records.size() - 1), "Attribute to torture: #%s"); final AttributeRecord record = records.get(recordIndex); final int attributeSize = record.attributeBytesLength(); /... | performCommand |
270,807 | void (final @NotNull ImperativeCommand.Environment env) { try { if (!records.isEmpty()) { final int recordIndex = env.generateValue(Generator.integers(0, records.size() - 1), "Attribute to delete: #%s"); final AttributeRecord recordToDelete = records.remove(recordIndex); attributes.deleteRecord(recordToDelete, storage)... | performCommand |
270,808 | UpdateAPIMethod[] () { return new UpdateAPIMethod[]{ DEFAULT_API_UPDATE_METHOD, MODERN_API_UPDATE_METHOD }; } | METHODS_TO_TEST |
270,809 | void () { final int pageSize = pagedStorage.getPageSize(); final int enoughRecords = (pageSize / RECORD_SIZE_IN_BYTES) * 16; for (int recordId = 0; recordId < enoughRecords; recordId++) { final long recordOffsetInFile = storage.recordOffsetInFileUnchecked(recordId); final long recordEndOffsetInFile = recordOffsetInFile... | recordAreAlwaysAlignedFullyOnSinglePage |
270,810 | void () { final int pageSize = pagedStorage.getPageSize(); final int enoughRecords = (pageSize / RECORD_SIZE_IN_BYTES) * 16; long expectedRecordOffsetInFile = PersistentFSRecordsOverLockFreePagedStorage.HEADER_SIZE; for (int recordId = NULL_ID + 1; recordId < enoughRecords; recordId++) { final long recordOffsetInFile =... | recordOffsetCalculatedByStorageIsConsistentWithPlainCalculation |
270,811 | UpdateAPIMethod[] () { return new UpdateAPIMethod[]{ DEFAULT_API_UPDATE_METHOD, MODERN_API_UPDATE_METHOD }; } | METHODS_TO_TEST |
270,812 | void () { } | closeAndRemoveAllFiles_cleansUpEverything_newStorageCreatedFromSameFilenameIsEmpty |
270,813 | void () { final int fileId = 1; final int nameId = 42; invertedNameIndex.updateFileName(fileId, nameId, NULL_NAME_ID); final IntArraySet fileIds = fileIdsByNameId(nameId); assertTrue( "fileId(" + fileId + ") indexed must be the one reported back", fileIds.size() == 1 && fileIds.contains(fileId) ); } | singleFileIdMappedToNameIdCouldBeListedBack |
270,814 | void () { final int[] fileIds = new int[]{1, 2, 3, 4, 5}; final int nameId = 42; for (int fileId : fileIds) { invertedNameIndex.updateFileName(fileId, nameId, NULL_NAME_ID); } final IntArraySet fileIdsReported = fileIdsByNameId(nameId); assertTrue( "fileIds(" + Arrays.toString(fileIds) + ") indexed must be the all repo... | allFileIdsMappedToSameNameIdCouldAllBeListedBack |
270,815 | void () { final int fileId = 1; final int nameId = 11; //add fileId -> nameId mapping invertedNameIndex.updateFileName(fileId, nameId, NULL_NAME_ID); //remove fileId -> nameId mapping invertedNameIndex.updateFileName(fileId, NULL_NAME_ID, nameId); final IntArraySet fileIds = fileIdsByNameId(nameId); assertTrue( "fileId... | singleFileIdToNameIdMappingAddedAndRemovedNotListedBack |
270,816 | void () { final Int2ObjectMap<IntArraySet> fileIdToNameId = generateEnoughMappings(ENOUGH_MAPPINGS); //add mappings one-by-one, and check each mapping is _absent_ in index before // it is added, and _present_ in the index just after it has been added: for (Map.Entry<Integer, IntArraySet> entry : fileIdToNameId.int2Obje... | manyFileIdToNameIdMappingsAddedAndRemovedCouldBeListedBack |
270,817 | IntArraySet (final int nameId) { final IntArraySet nameIds = new IntArraySet(new int[]{nameId}); final IntArraySet fileIds = new IntArraySet(); invertedNameIndex.forEachFileIds(nameIds, fId -> { fileIds.add(fId); return true; }); return fileIds; } | fileIdsByNameId |
270,818 | Int2ObjectMap<IntArraySet> (final int size) { final ThreadLocalRandom rnd = ThreadLocalRandom.current(); final Int2ObjectMap<IntArraySet> fileIdToNameId = new Int2ObjectOpenHashMap<>(); rnd.ints() .distinct() .limit(size) .forEach( i -> { final int fileId = Math.abs(i); final int[] nameIds = rnd.ints().distinct().limit... | generateEnoughMappings |
270,819 | VFileMock () { return createFile(System.currentTimeMillis()); } | createFile |
270,820 | VFileMock (long timestamp) { int fileId = vfs.createRecord(); return new VFileMock(fileId, timestamp); } | createFile |
270,821 | VFileMock (int fileId, long timestamp) { while (fileId > vfs.connection().getRecords().maxAllocatedID()) { vfs.createRecord(); } return new VFileMock(fileId, timestamp); } | createFile |
270,822 | long () { return timestamp; } | getTimeStamp |
270,823 | int () { return id; } | getId |
270,824 | String () { throw new UnsupportedOperationException("Method is not implemented"); } | getName |
270,825 | VirtualFileSystem () { throw new UnsupportedOperationException("Method is not implemented"); } | getFileSystem |
270,826 | String () { throw new UnsupportedOperationException("Method is not implemented"); } | getPath |
270,827 | boolean () { throw new UnsupportedOperationException("Method is not implemented"); } | isWritable |
270,828 | boolean () { throw new UnsupportedOperationException("Method is not implemented"); } | isDirectory |
270,829 | boolean () { throw new UnsupportedOperationException("Method is not implemented"); } | isValid |
270,830 | VirtualFile () { throw new UnsupportedOperationException("Method is not implemented"); } | getParent |
270,831 | VirtualFile[] () { throw new UnsupportedOperationException("Method is not implemented"); } | getChildren |
270,832 | long () { throw new UnsupportedOperationException("Method is not implemented"); } | getLength |
270,833 | void (boolean asynchronous, boolean recursive, @Nullable Runnable postRunnable) { throw new UnsupportedOperationException("Method is not implemented"); } | refresh |
270,834 | void () { final String stringWithZeroHash = "\u0000"; assertEquals("'\\u0000'.hashCode() should be 0", stringWithZeroHash.hashCode(), 0); index.addFileName(1, stringWithZeroHash); //no exceptions } | indexIsAbleToDealWithZeroHashCodeNames |
270,835 | void () { final int[] fileIds = IntStream.range(1, ENOUGH_COLLISIONS_TO_CHECK).toArray(); final String fileName = "A"; for (final int fileId : fileIds) { index.addFileName(fileId, fileName); } final IntArraySet fileIdsFound = lookupIndexByFileName(index, fileName); assertEquals( "All fileIds with the same name should b... | manyFilesWithSameNameIsOK |
270,836 | void () { final Int2ObjectMap<String> fileIdToName = generateFileNames(ENOUGH_ENTRIES_TO_CHECK); final Map<String, IntArraySet> etalon = CollectionFactory.createSmallMemoryFootprintMap(); for (Int2ObjectMap.Entry<String> e : fileIdToName.int2ObjectEntrySet()) { final int fileId = e.getIntKey(); final String fileName = ... | allFileIdsAddedToIndexCouldBeFoundByName |
270,837 | void () { final Int2ObjectMap<String> fileIdToName = generateFileNames(ENOUGH_ENTRIES_TO_CHECK); for (Int2ObjectMap.Entry<String> e : fileIdToName.int2ObjectEntrySet()) { final int fileId = e.getIntKey(); final String fileName = e.getValue(); index.addFileName(fileId, fileName); assertTrue( "Index must return fileId ju... | afterManyFileIdsAddedAndRemovedFromIndex_NothingCouldBeFoundByName |
270,838 | void () { final Int2ObjectMap<String> fileIdToName = generateFileNames(ENOUGH_ENTRIES_TO_CHECK); final Map<String, IntArraySet> etalon = CollectionFactory.createSmallMemoryFootprintMap(); for (Int2ObjectMap.Entry<String> e : fileIdToName.int2ObjectEntrySet()) { final int fileId = e.getIntKey(); final String fileName = ... | notTooManyFalsePositivesInIndexLookups |
270,839 | IntArraySet (final InvertedFilenameHashBasedIndex index, final String fileName) { final IntArraySet fileIds = new IntArraySet(); index.likelyFilesWithNames(Set.of(fileName), fileId -> { fileIds.add(fileId); return true; }); return fileIds; } | lookupIndexByFileName |
270,840 | Int2ObjectMap<String> (final int count) { final Int2ObjectOpenHashMap<String> fileIdToName = new Int2ObjectOpenHashMap<>(count); final ThreadLocalRandom rnd = ThreadLocalRandom.current(); final int maxNameSize = 50; final List<String> names = IntStream.range(0, count / 2)// E.V. 2 files per each name .mapToObj( i -> ra... | generateFileNames |
270,841 | String (final ThreadLocalRandom rnd, final int size) { final char[] chars = new char[size]; for (int i = 0; i < chars.length; i++) { chars[i] = Character.forDigit(rnd.nextInt(0, 36), 36); } return new String(chars); } | randomAlphanumericString |
270,842 | StorageRecord[] (int count, int maxSize) { final ThreadLocalRandom rnd = ThreadLocalRandom.current(); //exponential distribution with avg=30, cut off [0, maxSize]: IntSupplier payloadSizeGenerator = () -> (int)Math.max(Math.min(rnd.nextExponential() * 30, maxSize), 0); return generateRecords(count, payloadSizeGenerator... | generateRecords |
270,843 | StorageRecord[] (int count, @NotNull IntSupplier payloadSizeGenerator) { final ThreadLocalRandom rnd = ThreadLocalRandom.current(); return Stream.generate(() -> { final int payloadSize = payloadSizeGenerator.getAsInt(); return BlobStorageTestBase.randomString(rnd, payloadSize); }) .limit(count) .map(StorageRecord::new)... | generateRecords |
270,844 | String (final Random rnd, final int size) { final char[] chars = new char[size]; for (int i = 0; i < chars.length; i++) { chars[i] = Character.forDigit(rnd.nextInt(0, 36), 36); } return new String(chars); } | randomString |
270,845 | StorageRecord (final @NotNull String newPayload) { return new StorageRecord(recordId, newPayload); } | withPayload |
270,846 | StorageRecord (final int size) { return withPayload(BlobStorageTestBase.randomString(ThreadLocalRandom.current(), size)); } | withRandomPayloadOfSize |
270,847 | StorageRecord (final int payloadSize) { return new StorageRecord(randomString(ThreadLocalRandom.current(), payloadSize)); } | recordWithRandomPayload |
270,848 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final StorageRecord record = (StorageRecord)o; if (recordId != record.recordId) return false; if (!Objects.equals(payload, record.payload)) return false; return true; } | equals |
270,849 | int () { int result = recordId; result = 31 * result + payload.hashCode(); return result; } | hashCode |
270,850 | String () { return "Record[#" + recordId + "]{" + payload + '}'; } | toString |
270,851 | List<SpaceAllocationStrategy> () { return Arrays.asList( new WriterDecidesStrategy(StreamlinedBlobStorageHelper.MAX_CAPACITY, 1024), new WriterDecidesStrategy(StreamlinedBlobStorageHelper.MAX_CAPACITY, 256), new DataLengthPlusFixedPercentStrategy(256, 1024, StreamlinedBlobStorageHelper.MAX_CAPACITY, 30), new DataLength... | allocationStrategiesToTry |
270,852 | Integer[] () { return new Integer[]{ //Try quite small pages, so issues on the page borders have a chance to manifest themselves 1 << 14, 1 << 18, 1 << 22 }; } | pageSizesToTry |
270,853 | String (final ByteBuffer buffer) { final int length = buffer.remaining(); final byte[] bytes = new byte[length]; buffer.get(bytes); return new String(bytes, US_ASCII); } | stringFromBuffer |
270,854 | void () { int enoughIds = 1 << 20; for (long recordId = -enoughIds; recordId < enoughIds; recordId++) { long recordOffset; try { recordOffset = AppendOnlyLogOverMMappedFile.recordIdToOffset(recordId); } catch (AssertionError | IllegalArgumentException e) { continue;//invalid id, OK } //...but if id is accepted by .reco... | anyRecordId_IsEitherRejected_OrConvertedToValidRecordOffset_ThatCouldBeSuccessfullyConvertedBack |
270,855 | String[] (int stringsCount) { ThreadLocalRandom rnd = ThreadLocalRandom.current(); return Stream.generate(() -> { return BlobStorageTestBase.randomString(rnd, rnd.nextInt(0, MAX_RECORD_SIZE)); }) .limit(stringsCount) .toArray(String[]::new); } | generateRandomStrings |
270,856 | byte[] (@NotNull ByteBuffer buffer) { byte[] bytes = new byte[buffer.remaining()]; buffer.get(bytes); return bytes; } | readBytes |
270,857 | void () { assertTrue( multimap.wasProperlyClosed(), "Freshly created ExtendibleHashMap is always 'properly closed'" ); } | freshlyCreatedMap_isProperlyClosedByDefinition |
270,858 | void (String nameWithoutSeparator) { assertNameValid(nameWithoutSeparator); assertNameValid('/' + nameWithoutSeparator); } | nameValid_WithoutFileSeparator_ExceptForTheStart |
270,859 | void (String nameWithSeparator) { assertNameInvalid(nameWithSeparator); if(SystemInfo.isWindows) { //try both kinds of file-separator: assertNameInvalid(nameWithSeparator.replace('/', '\\')); } } | nameInvalid_WithFileSeparatorAnywhereButAtBeginning |
270,860 | void (String uncPath) { if (SystemInfo.isWindows) { assertNameValid(uncPath); } else { assertNameInvalid(uncPath); } } | shortUNCPath_IsValidOnWindows_ButInvalidEverywhereElse |
270,861 | void (String longUNCPath) { assertNameValid(longUNCPath); } | nameValid_ifEndsWithUrlSchema |
270,862 | void (String longUNCPath) { assertNameInvalid(longUNCPath); } | nameInvalid_ifLongUNCName |
270,863 | void (@NotNull String name) { SLRUFileNameCache.assertShortFileName(name); } | assertNameValid |
270,864 | void (@NotNull String name) { try { SLRUFileNameCache.assertShortFileName(name); fail("Name [" + name + "] is invalid, must throw exception"); } catch (IllegalArgumentException expected) { } } | assertNameInvalid |
270,865 | void (int threadNumber, int[] ids, Random threadRandom, int queryCount) { final int blackHole = threadRandom.nextInt(); for (int j = 0; j < queryCount; j++) { final CharSequence name = FSRecords.getInstance().getNameByNameId(ids[threadRandom.nextInt(ids.length)]); if (blackHole == name.hashCode() && blackHole + 1 == na... | doTest |
270,866 | String () { return "random access"; } | toString |
270,867 | void (int threadNumber, int[] ids, Random threadRandom, int queryCount) { final int blackHole = threadRandom.nextInt(); for (int j = 0; j < queryCount; j++) { final int hash = getPath(threadRandom.nextInt(ids.length), ids); if (blackHole == hash) { failure(); } } } | doTest |
270,868 | String () { return "random access + getPath"; } | toString |
270,869 | void (int threadNumber, int[] ids, Random threadRandom, int queryCount) { if (threadNumber % 2 == 1) { // linear scan for every second_case final int blackHole = threadRandom.nextInt(); int currentId = 0; for (int j = 0; j < queryCount; ++j) { final int hash = getPath(currentId++, ids); if (currentId == ids.length) cur... | doTest |
270,870 | String () { return "linear scan + random access + getPath"; } | toString |
270,871 | int (int id, int[] ids) { int result = 0; while (id > 0) { result += FSRecords.getInstance().getNameByNameId(ids[id]).hashCode(); id /= 10; } return result; } | getPath |
270,872 | void () { System.err.println("Failure"); assert false; } | failure |
270,873 | void (Int2ObjectMap<CharSequence> map, int[] ids) { for (int id : ids) { Assert.assertEquals(map.get(id), FSRecords.getInstance().getNameByNameId(id)); } } | checkNames |
270,874 | Int2ObjectMap<CharSequence> (int nameCount) { Random random = new Random(); Int2ObjectMap<CharSequence> map = new Int2ObjectOpenHashMap<>(); for (int i = 0; i < nameCount; i++) { String name = "some_name_" + random.nextInt() + StringUtil.repeat("a", random.nextInt(10)); int id = FSRecords.getInstance().getNameId(name);... | generateNames |
270,875 | void () { assertThrows( IllegalStateException.class, () -> new MMappedFileStorage(storage.storagePath(), PAGE_SIZE) ); } | openingSecondStorage_OverSameFile_Fails |
270,876 | CharSequence () { return "dir"; } | getNameSequence |
270,877 | void (File jar, VirtualFile vFile, PsiFile file) { VirtualFile jarRoot; File libDir = new File(jar.getParent(), "lib"); assertTrue(libDir.mkdir()); VirtualFile vLibDir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(libDir); assertNotNull(vLibDir); jarRoot = JarFileSystem.getInstance().getRootByLocal(vFile);... | checkMove |
270,878 | void (PsiNamedElement file, String newName) { new RenameProcessor(getProject(), file, newName, false, false).run(); } | rename |
270,879 | void () { assumeWindows(); assumeTrue("'fsutil.exe' needs elevated privileges to work", SuperUserStatus.isSuperUser()); assumeTrue("'fsutil.exe' not found in %Path%", PathEnvironmentVariableUtil.findInPath("fsutil.exe") != null); assumeTrue("'wsl.exe' not found in %Path% (needed for 'setCaseSensitiveInfo')", PathEnviro... | setUp |
270,880 | void (@NotNull List<? extends @NotNull VFileEvent> events) { VFileEvent changeEvent = ContainerUtil.find(events, event -> event instanceof VFilePropertyChangeEvent && ((VFilePropertyChangeEvent)event).getPropertyName().equals(VirtualFile.PROP_CHILDREN_CASE_SENSITIVITY) && dir.equals(event.getFile()) && ((VFilePropertyC... | after |
270,881 | void () { MessageBusConnection connection = ApplicationManager.getApplication().getMessageBus().connect(getTestRootDisposable()); connection.subscribe(VirtualFileManager.VFS_CHANGES, new BulkFileListener() { @Override public void before(@NotNull List<? extends @NotNull VFileEvent> events) { for (VFileEvent event : even... | setUp |
270,882 | void (@NotNull List<? extends @NotNull VFileEvent> events) { for (VFileEvent event : events) { VirtualFile file = event.getFile(); if (file != null && !(file.getFileSystem() instanceof TempFileSystemMarker)) { boolean shouldBeValid = !(event instanceof VFileCreateEvent); assertEquals(event.toString(), shouldBeValid, fi... | before |
270,883 | void (@NotNull List<? extends @NotNull VFileEvent> events) { for (VFileEvent event : events) { VirtualFile file = event.getFile(); if (file != null && !(file.getFileSystem() instanceof TempFileSystemMarker)) { boolean shouldBeValid = !(event instanceof VFileDeleteEvent); assertEquals(event.toString(), shouldBeValid, fi... | after |
270,884 | void () { myFS = null; } | tearDown |
270,885 | void () { VirtualFile dir = requireNonNull(myFS.refreshAndFindFileByIoFile(tempDir.newDirectory("xxx"))); assertFalse(((VirtualDirectoryImpl)dir).allChildrenLoaded()); assertNull(dir.findChild(".")); assertNull(dir.findChild("..")); } | findChildWithSpecialName |
270,886 | void () { tempDir.newFile("a/b/c/f"); VirtualFile file = myFS.refreshAndFindFileByPath(tempDir.getRoot() + "/a\\b//c\\f"); assertNotNull(file); assertEquals("f", file.getName()); assertEquals("c", file.getParent().getName()); assertEquals("b", file.getParent().getParent().getName()); assertEquals("a", file.getParent().... | testFindFileSeparatorNormalization |
270,887 | void () { String name = getUnicodeName(); assumeTrue(name != null); File childFile = tempDir.newFile(name + ".txt"); VirtualFile dir = myFS.refreshAndFindFileByIoFile(tempDir.getRoot()); assertNotNull(dir); VirtualFile child = myFS.refreshAndFindFileByIoFile(childFile); assertNotNull(Arrays.toString(dir.getChildren()) ... | testUnicodeName |
270,888 | void () { assertNull(myFS.findFileByPath("wrong_path")); if (SystemInfo.isWindows) { String systemDrive = System.getenv("SystemDrive"); VirtualFile root = myFS.findFileByPath(systemDrive.toLowerCase(Locale.ENGLISH)); assertNotNull(root); assertEquals(systemDrive.toUpperCase(Locale.ENGLISH) + '/', root.getPath()); Virtu... | testFindRoot |
270,889 | void () { assumeWindows(); File file = new File("C:\\Documents and Settings\\desktop.ini"); assumeTrue("Documents and Settings assumed to exist", file.exists()); String parent = FileUtil.toSystemIndependentName(file.getParent()); VfsRootAccess.allowRootAccess(getTestRootDisposable(), parent); VirtualFile virtualFile = ... | testWindowsHiddenDirectory |
270,890 | void () { assumeUnix(); File file = tempDir.newFile("test\\file.txt"); VirtualFile vDir = myFS.refreshAndFindFileByIoFile(tempDir.getRoot()); assertNotNull(vDir); assertThat(vDir.getChildren()).isEmpty(); ((VirtualFileSystemEntry)vDir).markDirtyRecursively(); vDir.refresh(false, true); assertNull(myFS.refreshAndFindFil... | testBadFileNameUnderUnix |
270,891 | void () { DefaultLogger.disableStderrDumping(getTestRootDisposable()); try { ManagingFS.getInstance().findRoot("", myFS); fail("should fail by assertion in PersistentFsImpl.findRoot()"); } catch (Throwable t) { String message = t.getMessage(); assertTrue(message, message.startsWith("Invalid root")); } } | testNoMoreFakeRoots |
270,892 | void () { try { File d = tempDir.newDirectory(); VirtualFile vDir = requireNonNull(LocalFileSystem.getInstance().refreshAndFindFileByIoFile(d)); ManagingFS.getInstance().findRoot(vDir.getPath(), myFS); fail("should fail by assertion in PersistentFsImpl.findRoot()"); } catch (Throwable t) { String message = t.getMessage... | testFindRootWithDeepNestedFileMustThrow |
270,893 | void () { File sub = tempDir.newDirectory("sub"); File file = tempDir.newFile("file.txt"); VirtualFile topDir = myFS.refreshAndFindFileByIoFile(tempDir.getRoot()); assertNotNull(topDir); VirtualFile sourceFile = myFS.refreshAndFindFileByIoFile(file); assertNotNull(sourceFile); VirtualFile parentDir = myFS.refreshAndFin... | testCopyToPointDir |
270,894 | void (@NotNull List<? extends @NotNull VFileEvent> events) { events.forEach(e -> processed.add(e.getFile())); } | after |
270,895 | FileVisitResult (Path dir, IOException exc) { for (int k = 1; k <= 3; k++) { createTestFile(dir.toFile(), "file_" + k, "."); } return FileVisitResult.CONTINUE; } | postVisitDirectory |
270,896 | void (@NotNull List<? extends @NotNull VFileEvent> events) { events.forEach(e -> processed.add(e.getFile())); } | after |
270,897 | void () { runInEdtAndWait(() -> { VirtualFile dir = myFS.refreshAndFindFileByIoFile(tempDir.getRoot()); assertNotNull(dir); try { WriteAction.run(() -> dir.createChildData(this, "a/b")); fail("invalid file name should have been rejected"); } catch (IOException e) { assertEquals(CoreBundle.message("file.invalid.name.err... | testInvalidFileName |
270,898 | void (@NotNull List<? extends @NotNull VFileEvent> events) { for (VFileEvent event : events) { if (event instanceof VFileContentChangeEvent && vFile.equals(event.getFile())) { updated[0]++; break; } } } | after |
270,899 | void (File file, VirtualFile vFile, boolean expected) { assertEquals(expected, file.canWrite()); assertEquals(expected, requireNonNull(FileSystemUtil.getAttributes(file)).isWritable()); assertEquals(expected, vFile.isWritable()); } | assertWritable |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.