Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/source/SourceSectionTest.java @ 22292:0e13cbebc04c
Truffle/Source: remove two previously @Ignored tests that are inconsistent with the current text model being used.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Thu, 08 Oct 2015 10:07:07 -0400 |
parents | dc83cc1f94f2 |
children | f56fa795a5a5 |
comparison
equal
deleted
inserted
replaced
22291:c3ea80aa5762 | 22292:0e13cbebc04c |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.truffle.api.test.source; | 23 package com.oracle.truffle.api.test.source; |
24 | 24 |
25 import static org.junit.Assert.assertEquals; | |
26 import static org.junit.Assert.assertNotNull; | |
27 | |
28 import org.junit.Test; | |
29 | |
25 import com.oracle.truffle.api.source.Source; | 30 import com.oracle.truffle.api.source.Source; |
26 import com.oracle.truffle.api.source.SourceSection; | 31 import com.oracle.truffle.api.source.SourceSection; |
27 import static org.junit.Assert.assertEquals; | |
28 import static org.junit.Assert.assertNotNull; | |
29 import org.junit.Ignore; | |
30 import org.junit.Test; | |
31 | 32 |
32 public class SourceSectionTest { | 33 public class SourceSectionTest { |
33 | 34 |
34 private final Source emptySource = Source.fromText("", null); | 35 private final Source emptySource = Source.fromText("", null); |
35 | 36 |
54 assertEquals(section.getCharLength(), 0); | 55 assertEquals(section.getCharLength(), 0); |
55 assertEquals(section.getStartLine(), 1); | 56 assertEquals(section.getStartLine(), 1); |
56 assertEquals(section.getStartColumn(), 1); | 57 assertEquals(section.getStartColumn(), 1); |
57 } | 58 } |
58 | 59 |
59 @Ignore | |
60 @Test | |
61 public void emptyLineTest0a() { | |
62 SourceSection section = emptyLineSource.createSection("test", 0, 0); | |
63 assertEquals(section.getEndLine(), 1); | |
64 assertEquals(section.getEndColumn(), 1); | |
65 } | |
66 | |
67 @Test | 60 @Test |
68 public void emptyLineTest1() { | 61 public void emptyLineTest1() { |
69 SourceSection section = emptyLineSource.createSection("test", 0, 1); | 62 SourceSection section = emptyLineSource.createSection("test", 0, 1); |
70 assertNotNull(section); | 63 assertNotNull(section); |
71 assertEquals(section.getCode(), "\n"); | 64 assertEquals(section.getCode(), "\n"); |
72 assertEquals(section.getCharIndex(), 0); | 65 assertEquals(section.getCharIndex(), 0); |
73 assertEquals(section.getCharLength(), 1); | 66 assertEquals(section.getCharLength(), 1); |
74 assertEquals(section.getStartLine(), 1); | |
75 assertEquals(section.getStartColumn(), 1); | |
76 assertEquals(section.getEndLine(), 1); | |
77 assertEquals(section.getEndColumn(), 1); | |
78 } | |
79 | |
80 @Ignore | |
81 @Test | |
82 public void emptyLineTest2() { | |
83 SourceSection section = emptyLineSource.createSection("test", 1, 0); | |
84 assertNotNull(section); | |
85 assertEquals(section.getCode(), ""); | |
86 assertEquals(section.getCharIndex(), 1); | |
87 assertEquals(section.getCharLength(), 0); | |
88 assertEquals(section.getStartLine(), 1); | 67 assertEquals(section.getStartLine(), 1); |
89 assertEquals(section.getStartColumn(), 1); | 68 assertEquals(section.getStartColumn(), 1); |
90 assertEquals(section.getEndLine(), 1); | 69 assertEquals(section.getEndLine(), 1); |
91 assertEquals(section.getEndColumn(), 1); | 70 assertEquals(section.getEndColumn(), 1); |
92 } | 71 } |