/** * Returns whether tokens of the specified type should have "mark * occurrences" enabled for the current programming language. * * @param type The token type. * @return Whether tokens of this type should have "mark occurrences" * enabled. */ boolean getMarkOccurrencesOfTokenType(int type) { return tokenMaker.getMarkOccurrencesOfTokenType(type); }
@Test public void getTestMarkOccurrencesOfTokenType() { TokenMaker tm = createTokenMaker(); Assert.assertTrue(tm.getMarkOccurrencesOfTokenType(TokenTypes.RESERVED_WORD)); Assert.assertTrue(tm.getMarkOccurrencesOfTokenType(TokenTypes.IDENTIFIER)); Assert.assertFalse(tm.getMarkOccurrencesOfTokenType(TokenTypes.OPERATOR)); }
@Test public void testLess_getMarkOccurrencesOfTokenType() { TokenMaker tm = createTokenMaker(); Assert.assertTrue(tm.getMarkOccurrencesOfTokenType(TokenTypes.RESERVED_WORD)); Assert.assertTrue(tm.getMarkOccurrencesOfTokenType(TokenTypes.VARIABLE)); Assert.assertFalse(tm.getMarkOccurrencesOfTokenType(TokenTypes.COMMENT_EOL)); }
@Test public void testCss_getMarkOccurrencesOfTokenType() { TokenMaker tm = createTokenMaker(); Assert.assertTrue(tm.getMarkOccurrencesOfTokenType(TokenTypes.RESERVED_WORD)); Assert.assertFalse(tm.getMarkOccurrencesOfTokenType(TokenTypes.VARIABLE)); }
@Test public void testGetMarkOccurrencesOfTokenType() { TokenMaker tm = createTokenMaker(); Assert.assertTrue(tm.getMarkOccurrencesOfTokenType( TokenTypes.RESERVED_WORD)); Assert.assertFalse(tm.getMarkOccurrencesOfTokenType( TokenTypes.VARIABLE)); }
@Test public void test_api_getMarkOccurrencesOfTokenType() { TokenMaker tm = createTokenMaker(); // NOTE: This array must be sorted for this test to work! int[] expected = { TokenTypes.VARIABLE, TokenTypes.IDENTIFIER, }; for (int i = 0; i < TokenTypes.DEFAULT_NUM_TOKEN_TYPES; i++) { boolean shouldMark = Arrays.binarySearch(expected, i) >= 0; Assert.assertEquals(shouldMark, tm.getMarkOccurrencesOfTokenType(i)); } }
@Test public void testGetMarkOccurrencesOfTokenType() { TokenMaker tm = createTokenMaker(); Assert.assertFalse(tm.getMarkOccurrencesOfTokenType( TokenTypes.IDENTIFIER)); }
/** * Returns whether tokens of the specified type should have "mark * occurrences" enabled for the current programming language. * * @param type The token type. * @return Whether tokens of this type should have "mark occurrences" * enabled. */ boolean getMarkOccurrencesOfTokenType(int type) { return tokenMaker.getMarkOccurrencesOfTokenType(type); }
/** * Returns whether tokens of the specified type should have "mark * occurrences" enabled for the current programming language. * * @param type The token type. * @return Whether tokens of this type should have "mark occurrences" * enabled. */ boolean getMarkOccurrencesOfTokenType(int type) { return tokenMaker.getMarkOccurrencesOfTokenType(type); }
/** * Returns whether tokens of the specified type should have "mark * occurrences" enabled for the current programming language. * * @param type The token type. * @return Whether tokens of this type should have "mark occurrences" * enabled. */ boolean getMarkOccurrencesOfTokenType(int type) { return tokenMaker.getMarkOccurrencesOfTokenType(type); }