flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request #5218: [FLINK-8331][core] FieldParser do not correctly se...
Date Sat, 30 Dec 2017 19:49:30 GMT
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5218#discussion_r159127981
  
    --- Diff: flink-core/src/test/java/org/apache/flink/types/parser/FieldParserTest.java
---
    @@ -43,4 +43,38 @@ public void testEndsWithDelimiter() throws Exception {
     		assertFalse(FieldParser.endsWithDelimiter(bytes, 3, delim));
     	}
     
    +	@Test
    +	public void testNextStringEndPos() throws Exception {
    +		byte[] bytes = "a|c".getBytes();
    +		byte[] delim = "|".getBytes();
    +		FieldParser parser = new TestFieldParser<String>();
    +
    +		assertEquals(1, parser.nextStringEndPos(bytes, 0, 3, delim));
    +		assertEquals(-1, parser.nextStringEndPos(bytes, 3, 3, delim));
    --- End diff --
    
    add an assertion that the error state was correctly set


---

Mime
View raw message