Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
64,900 | void () { doTest("next.subKey"); } | testPasteKeysWithNoChange |
64,901 | void () { doTest("next.subKey"); } | testDoNotPasteKeysInSequenceNode |
64,902 | void () { doTest("'|'.\">\"", "simple.before.yml"); } | testPasteKeysWithStringKeys |
64,903 | void () { doTest("next.subKey"); } | testPasteKeysInEmptyKeyValue |
64,904 | void () { doTest("next.subKey"); } | testPasteKeysInEmptyKeyValue2 |
64,905 | void () { doTest("workspace{w1}/next.^sub[Key]*(%magic%)"); } | testPasteKeysWithStrangeSymbols1 |
64,906 | void () { doTest(".leading.subKey"); } | testPasteKeysWithLeadingDot |
64,907 | void () { assert YAMLEditorOptions.getInstance().isUseSmartPaste(); try { YAMLEditorOptions.getInstance().setUseSmartPaste(false); doTest("next.subKey"); } finally { YAMLEditorOptions.getInstance().setUseSmartPaste(true); } } | testDoNotPasteWithOptionDisabled |
64,908 | void (@NotNull String pasteText) { doTest(pasteText, null); } | doTest |
64,909 | void (@NotNull String pasteText, @Nullable String inputName) { String testName = getTestName(true); String fileName = ObjectUtils.notNull(StringUtil.substringBefore(testName, "_"), testName); myFixture.configureByFile(StringUtil.notNullize(inputName, fileName + ".before.yml")); CopyPasteManager.getInstance().setContent... | doTest |
64,910 | String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/structure/data/"; } | getTestDataPath |
64,911 | void () { doTest(); } | testAnchorsAndAliases |
64,912 | void () { String testName = getTestName(true); myFixture.configureByFile(testName + ".yml"); doStructureTest(testName, false); doStructureTest(testName, true); } | doTest |
64,913 | void (String testName, boolean resolveAliases) { myFixture.testStructureView(svc -> { svc.setActionActive(YAMLAliasResolveNodeProvider.ID, resolveAliases); PlatformTestUtil.expandAll(svc.getTree()); PlatformTestUtil.waitForPromise(svc.select(svc.getTreeModel().getCurrentEditorElement(), false)); TreePath leadPath = svc... | doStructureTest |
64,914 | void () { defaultTest(); } | testFolding |
64,915 | void () { defaultTest(); } | testSequenceFolding |
64,916 | void () { defaultTest(); } | testRuby18677 |
64,917 | void () { defaultTest(); } | testRuby22423 |
64,918 | void () { defaultTest(); } | testComments |
64,919 | void () { defaultTest(); } | testRegionFolding |
64,920 | void () { myFixture.testFolding(getTestDataPath() + getTestName(true) + ".yaml"); } | defaultTest |
64,921 | String () { return TEST_DATA_PATH + "/folding/data/"; } | getTestDataPath |
64,922 | String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/editing/data/"; } | getTestDataPath |
64,923 | void () { setUpFile(); String firstPass = tokenList(); myFixture.type("n"); String secondPass = tokenList(); assertEquals(firstPass, secondPass); } | testChangeOfBlockScalarValueInInlineMap |
64,924 | void () { String testName = getTestName(true); myFixture.configureByFile(testName + ".yml"); } | setUpFile |
64,925 | String () { Editor editor = myFixture.getEditor(); EditorHighlighter highlighter = editor.getHighlighter(); StringBuilder result = new StringBuilder(); for (HighlighterIterator it = highlighter.createIterator(0); !it.atEnd(); it.advance()) { IElementType type = it.getTokenType(); result.append(type.toString()); result.... | tokenList |
64,926 | String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/editing/data/"; } | getTestDataPath |
64,927 | void () { doTest("\n"); } | testEmptyValue |
64,928 | void () { doTest("\n"); } | testNewValue |
64,929 | void () { doTest("\n"); } | testEmptySequenceItem |
64,930 | void () { doTestForSettings("\n", true, false); } | testNewIndentedSequenceItem_indentedSequence |
64,931 | void () { doTestForSettings("\n", false, false); } | testNewIndentedSequenceItem_sameIndent |
64,932 | void () { doTestForSettings("\n", true, true); } | testNewIndentedAutoHyphen_indentedSequence |
64,933 | void () { doTestForSettings("\n", false, true); } | testNewIndentedAutoHyphen_sameIndent |
64,934 | void () { doTestForSettings("\n", true, false); } | testNewSequenceItemZeroIndent_indentedSequence |
64,935 | void () { doTestForSettings("\n", false, false); } | testNewSequenceItemZeroIndent_sameIndent |
64,936 | void () { doTestForSettings("\n", true, true); } | testNewZeroIndentAutoHyphen_indentedSequence |
64,937 | void () { doTestForSettings("\n", false, true); } | testNewZeroIndentAutoHyphen_sameIndent |
64,938 | void () { doTest("\n"); } | testEmptyInlinedValue |
64,939 | void () { doTest("\n"); } | testBeginBlockScalar |
64,940 | void () { doTest("\n"); } | testContinueBlockScalar |
64,941 | void () { doTestForSettings("\n", false, false); } | testRegressionRuby21808 |
64,942 | void () { doTest("\n"); } | testPreserveDedent |
64,943 | void () { doTest("\n"); } | testPreserveDedentAfterInlinedMap |
64,944 | void () { doTest("["); } | testBracket |
64,945 | void () { doTest("{"); } public void testBackspaceTopLevelBracket() { doBackspaceTest(); } public void testBackspaceInternalBracket() { doBackspaceTest(); } public void testBackspaceTopLevelBrace() { doBackspaceTest(); } public void testBackspaceInternalBrace() { doBackspaceTest(); } public void testRemoveHyphenOnEnter... | testBrace |
64,946 | void () { doBackspaceTest(); } | testBackspaceTopLevelBracket |
64,947 | void () { doBackspaceTest(); } | testBackspaceInternalBracket |
64,948 | void () { doBackspaceTest(); } | testBackspaceTopLevelBrace |
64,949 | void () { doBackspaceTest(); } | testBackspaceInternalBrace |
64,950 | void () { doTest("\n"); } | testRemoveHyphenOnEnterInTheMiddleItem |
64,951 | void () { doTest("\n"); } | testRemoveHyphenOnEnterInTheLastItem |
64,952 | void () { doTest("\n"); } | testDoNotInsertHyphen |
64,953 | void () { doTestForSettings("- ", false, true); } | testAutoDecreaseHyphenIndent |
64,954 | void () { doTestForSettings("- ", true, true); } | testAutoIncreaseHyphenIndent |
64,955 | void () { doTest("- "); } | testDoNotChangeHyphenIndent1 |
64,956 | void () { doTest("- "); } | testDoNotChangeHyphenIndent2 |
64,957 | void (@NotNull String insert) { doTest(() -> myFixture.type(insert)); } | doTest |
64,958 | void () { doTest(() -> myFixture.performEditorAction(IdeActions.ACTION_EDITOR_BACKSPACE)); } | doBackspaceTest |
64,959 | void (@NotNull Runnable actions) { String testName = getTestName(true); myFixture.configureByFile(testName + ".before.yml"); actions.run(); myFixture.checkResultByFile(testName + ".after.yml"); } | doTest |
64,960 | void (@NotNull String insert, boolean indentSequenceVal, boolean autoHyphen) { String testName = getTestName(true); String fileName = ObjectUtils.notNull(StringUtil.substringBefore(testName, "_"), testName); myFixture.configureByFile(fileName + ".before.yml"); boolean backupIndentSequenceVal = getCustomSettings().INDEN... | doTestForSettings |
64,961 | YAMLCodeStyleSettings () { return CodeStyle.getCustomSettings(myFixture.getFile(), YAMLCodeStyleSettings.class); } | getCustomSettings |
64,962 | String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/schema/data"; } | getTestDataPath |
64,963 | String () { return ""; // unused } | getBasePath |
64,964 | Test () { final TestSuite suite = new TestSuite(YamlJsonSchemaTestSuite.class.getSimpleName()); suite.addTestSuite(YamlByJsonSchemaDocumentationTest.class); suite.addTestSuite(YamlByJsonSchemaCompletionTest.class); suite.addTestSuite(YamlByJsonSchemaNestedCompletionTest.class); suite.addTestSuite(YamlByJsonSchemaHeavyN... | suite |
64,965 | String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/schema/data/highlighting"; } | getTestDataPath |
64,966 | String () { return "config.yml"; } | getTestFileName |
64,967 | InspectionProfileEntry () { return new YamlJsonSchemaHighlightingInspection(); } | getInspectionProfile |
64,968 | Predicate<VirtualFile> () { return file -> file.getFileType() instanceof LanguageFileType && ((LanguageFileType)file.getFileType()).getLanguage().isKindOf( YAMLLanguage.INSTANCE); } | getAvailabilityPredicate |
64,969 | void () { @Language("JSON") final String schema = "{\"properties\": {\"prop\": {\"enum\": [1,2,3,\"18\"]}}}"; doTest(schema, "prop: 1"); doTest(schema, "prop: <warning>foo</warning>"); } | testEnum1 |
64,970 | void () { @Language("JSON") final String schema = "{\"properties\": {\"prop\": {}, \"flop\": {}}, \"required\": [\"flop\"]}"; doTest(schema, "<warning>prop: 2</warning>"); doTest(schema, "prop: 2\nflop: a"); doTest(schema, "flop: a"); } | testMissingProp |
64,971 | void () { doTest("{ \"properties\": { \"prop\": {\"type\": \"number\", \"multipleOf\": 2}}}", "prop: <warning descr=\"Schema validation: Is not multiple of 2\">3</warning>"); } | testNumberMultipleWrong |
64,972 | void () { doTest("{ \"properties\": { \"prop\": {\"type\": \"number\", \"multipleOf\": 2}}}", "prop: 4"); } | testNumberMultipleCorrect |
64,973 | void () { doTest(""" { "properties": { "prop": { "type": "number", "minimum": 0, "maximum": 100, "exclusiveMaximum": true }}}""", "prop: 14"); } | testNumberMinMax |
64,974 | void () { @Language("JSON") final String schema = "{\"properties\": {\"prop\": {\"enum\": [1,2,3,\"18\"]}}}"; doTest(schema, "prop: 18"); doTest(schema, "prop: 2"); doTest(schema, "prop: <warning descr=\"Schema validation: Value should be one of: 1, 2, 3, \\\"18\\\"\">6</warning>"); } | testEnum |
64,975 | void () { @Language("JSON") final String schema = "{\"properties\": {\"prop\": {\"type\": \"string\", \"minLength\": 2, \"maxLength\": 3}}}"; doTest(schema, "prop: <warning descr=\"Schema validation: String is shorter than 2\">s</warning>"); doTest(schema, "prop: sh"); doTest(schema, "prop: sho"); doTest(schema, "prop:... | testSimpleString |
64,976 | void () { @Language("JSON") final String schema = schema(""" { "type": "array", "items": { "type": "number", "minimum": 18 } }"""); doTest(schema, "prop:\n - 101\n - 102"); doTest(schema, "prop:\n - <warning descr=\"Schema validation: Less than the minimum 18\">16</warning>"); doTest(schema, "prop:\n - <warning descr=\... | testArray |
64,977 | void () { @Language("JSON") final String schema = """ { "type": "array", "items": { "type": "number", "minimum": 18 } }"""; doTest(schema, "- 101\n- 102"); } | testTopLevelArray |
64,978 | void () { @Language("JSON") final String schema = """ { "type": "array", "items": { "type": "object", "properties": {"a": {"type": "number"}} } }"""; doTest(schema, "- a: <warning descr=\"Schema validation: Incompatible types.\n Required: number. Actual: boolean.\">true</warning>"); doTest(schema, "- a: 18"); } | testTopLevelObjectArray |
64,979 | void () { @Language("JSON") final String schema = schema(""" { "type": "array", "items": [{ "type": "number", "minimum": 18 }, {"type" : "string"}] }"""); doTest(schema, "prop:\n - 101\n - <warning descr=\"Schema validation: Incompatible types.\n Required: string. Actual: integer.\">102</warning>"); } | testArrayTuples1 |
64,980 | void () { @Language("JSON") final String schema2 = schema(""" { "type": "array", "items": [{ "type": "number", "minimum": 18 }, {"type" : "string"}], "additionalItems": false}"""); doTest(schema2, "prop:\n - 101\n - <warning descr=\"Schema validation: Incompatible types.\n Required: string. Actual: integer.\">102</warn... | testArrayTuples2 |
64,981 | void () { @Language("JSON") final String schema = schema("{\"type\": \"array\", \"minItems\": 2, \"maxItems\": 3}"); doTest(schema, "prop:\n <warning descr=\"Schema validation: Array is shorter than 2\">- 1</warning>"); doTest(schema, "prop:\n - 1\n - 2"); doTest(schema, "prop:\n <warning descr=\"Schema validation: Arr... | testArrayLength |
64,982 | void () { @Language("JSON") final String schema = schema("{\"type\": \"array\", \"uniqueItems\": true}"); doTest(schema, "prop:\n - 1\n - 2"); doTest(schema, "prop:\n - <warning descr=\"Schema validation: Item is not unique\">1</warning>\n - 2\n - test\n - <warning descr=\"Schema validation: Item is not unique\">1</war... | testArrayUnique |
64,983 | void () { @Language("JSON") final String schema = """ { "title" : "Match anything", "description" : "This is a schema that matches anything.", "default" : "Default value" }"""; doTest(schema, "anything: 1"); } | testMetadataIsOk |
64,984 | void () { @Language("JSON") final String schema = "{\"type\": \"object\", \"properties\": {\"a\": {}, \"b\": {}}, \"required\": [\"a\"]}"; doTest(schema, "a: 11"); doTest(schema, "a: 1\nb: true"); doTest(schema, "<warning descr=\"Schema validation: Missing required property 'a'\">b: alarm</warning>"); } | testRequiredField |
64,985 | void () { @Language("JSON") final String schema = schema("{\"type\": \"object\", \"properties\": {\"a\": {}, \"b\": {}}, \"required\": [\"a\"]}"); doTest(schema, "prop:\n a: 11"); doTest(schema, "prop:\n a: 1\n b: true"); doTest(schema, "prop:\n <warning descr=\"Schema validation: Missing required property 'a'\">b: ala... | testInnerRequired |
64,986 | void () { @Language("JSON") final String schema = schema("{}"); doTest(schema, "prop:\n q: true\n someStuff: 20"); } | testAdditionalPropertiesAllowed |
64,987 | void () { @Language("JSON") final String schema = "{\"type\": \"object\", \"properties\": {\"prop\": {}}, \"additionalProperties\": false}"; // not sure abt inner object doTest(schema, "prop:\n q: true\n<warning descr=\"Schema validation: Property 'someStuff' is not allowed\">someStuff: 20</warning>"); } | testAdditionalPropertiesDisabled |
64,988 | void () { @Language("JSON") final String schema = "{\"type\": \"object\", \"properties\": {\"a\": {}}," + "\"additionalProperties\": {\"type\": \"number\"}}"; doTest(schema, "a: moo\nb: 5\nc: <warning descr=\"Schema validation: Incompatible types.\n Required: number. Actual: string.\">foo</warning>"); } | testAdditionalPropertiesSchema |
64,989 | void () { @Language("JSON") final String schema = "{\"type\": \"object\", \"minProperties\": 2, \"maxProperties\": 3}"; doTest(schema, "<warning descr=\"Schema validation: Number of properties is less than 2\">a: 3</warning>"); doTest(schema, "a: 1\nb: 5"); doTest(schema, """ <warning descr="Schema validation: Number o... | testMinMaxProperties |
64,990 | void () { final List<String> subSchemas = new ArrayList<>(); subSchemas.add("{\"type\": \"number\"}"); subSchemas.add("{\"type\": \"boolean\"}"); @Language("JSON") final String schema = schema("{\"oneOf\": [" + StringUtil.join(subSchemas, ", ") + "]}"); doTest(schema, "prop: 5"); doTest(schema, "prop: true"); doTest(sc... | testOneOf |
64,991 | void () { final List<String> subSchemas = new ArrayList<>(); subSchemas.add("{\"type\": \"string\", \"enum\": [\"a\", \"b\"]}"); subSchemas.add("{\"type\": \"string\", \"enum\": [\"a\", \"c\"]}"); @Language("JSON") final String schema = schema("{\"oneOf\": [" + StringUtil.join(subSchemas, ", ") + "]}"); doTest(schema, ... | testOneOfForTwoMatches |
64,992 | void () { final List<String> subSchemas = new ArrayList<>(); subSchemas.add(""" {"type": "string", "enum": [ "off", "warn", "error" ]}"""); subSchemas.add("{\"type\": \"integer\"}"); @Language("JSON") final String schema = schema("{\"oneOf\": [" + StringUtil.join(subSchemas, ", ") + "]}"); doTest(schema, "prop: off"); ... | testOneOfSelectError |
64,993 | void () { final List<String> subSchemas = new ArrayList<>(); subSchemas.add("{\"type\": \"string\", \"enum\": [\"a\", \"b\"]}"); subSchemas.add("{\"type\": \"string\", \"enum\": [\"a\", \"c\"]}"); @Language("JSON") final String schema = schema("{\"anyOf\": [" + StringUtil.join(subSchemas, ", ") + "]}"); doTest(schema, ... | testAnyOf |
64,994 | void () { final List<String> subSchemas = new ArrayList<>(); subSchemas.add("{\"type\": \"integer\", \"multipleOf\": 2}"); subSchemas.add("{\"enum\": [1,2,3]}"); @Language("JSON") final String schema = schema("{\"allOf\": [" + StringUtil.join(subSchemas, ", ") + "]}"); doTest(schema, "prop: <warning descr=\"Schema vali... | testAllOf |
64,995 | void () { @Language("JSON") final String schema = schema("{\"type\": \"array\", \"items\": {\"type\": \"object\"," + "\"properties\": {" + "\"innerType\":{}, \"innerValue\":{}" + "}, \"additionalProperties\": false" + "}}"); doTest(schema, "prop:\n- innerType: aaa\n <warning descr=\"Schema validation: Property 'alien' ... | testObjectInArray |
64,996 | void () { final String innerTypeSchema = "{\"properties\": {\"only\": {}}, \"additionalProperties\": false}"; @Language("JSON") final String schema = schema("{\"type\": \"array\", \"items\": {\"type\": \"object\"," + "\"properties\": {" + "\"innerType\":" + innerTypeSchema + "}, \"additionalProperties\": false" + "}}")... | testObjectDeeperInArray |
64,997 | void () { @Language("JSON") final String schema = "{\"properties\": {\"prop\": {\"type\": \"array\", \"items\": {\"enum\": [1,2,3]}}}}"; doTest(schema, "prop:\n - 1\n - 3"); doTest(schema, "prop:\n - <warning descr=\"Schema validation: Value should be one of: 1, 2, 3\">out</warning>"); } | testInnerObjectPropValueInArray |
64,998 | void () { @Language("JSON") final String schema = "{\"allOf\": [{\"type\": \"object\", \"properties\": {\"first\": {}}}," + " {\"properties\": {\"second\": {\"enum\": [33,44]}}}], \"additionalProperties\": false}"; // doTest(schema, "first: true\nsecond: <warning descr=\"Schema validation: Value should be one of: [33, ... | testAllOfProperties |
64,999 | void () { final String subSchema1 = "{\"enum\": [1,2,3,4,5]}"; final String subSchema2 = "{\"type\": \"array\", \"items\": {\"properties\": {\"kilo\": {}}, \"additionalProperties\": false}}"; @Language("JSON") final String schema = "{\"properties\": {\"prop\": {\"oneOf\": [" + subSchema1 + ", " + subSchema2 + "]}}}"; d... | testWithWaySelection |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.