annotate truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/source/SourceSectionTest.java @ 22157:dc83cc1f94f2

Using fully qualified imports
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Wed, 16 Sep 2015 11:33:22 +0200
parents 9c8c0937da41
children 0e13cbebc04c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21647
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
1 /*
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
4 *
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
8 *
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
13 * accompanied this code).
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
14 *
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
18 *
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
21 * questions.
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
22 */
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
23 package com.oracle.truffle.api.test.source;
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
24
22157
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
25 import com.oracle.truffle.api.source.Source;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
26 import com.oracle.truffle.api.source.SourceSection;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
27 import static org.junit.Assert.assertEquals;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
28 import static org.junit.Assert.assertNotNull;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
29 import org.junit.Ignore;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
30 import org.junit.Test;
21647
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
31
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
32 public class SourceSectionTest {
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
33
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
34 private final Source emptySource = Source.fromText("", null);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
35
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
36 private final Source emptyLineSource = Source.fromText("\n", null);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
37
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
38 private final Source shortSource = Source.fromText("01", null);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
39
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
40 private final Source longSource = Source.fromText("01234\n67\n9\n", null);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
41
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
42 public void emptySourceTest0() {
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
43 SourceSection section = emptySource.createSection("test", 0, 0);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
44 assertNotNull(section);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
45 assertEquals(section.getCode(), "");
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
46 }
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
47
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
48 @Test
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
49 public void emptyLineTest0() {
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
50 SourceSection section = emptyLineSource.createSection("test", 0, 0);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
51 assertNotNull(section);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
52 assertEquals(section.getCode(), "");
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
53 assertEquals(section.getCharIndex(), 0);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
54 assertEquals(section.getCharLength(), 0);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
55 assertEquals(section.getStartLine(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
56 assertEquals(section.getStartColumn(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
57 }
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
58
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
59 @Ignore
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
60 @Test
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
61 public void emptyLineTest0a() {
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
62 SourceSection section = emptyLineSource.createSection("test", 0, 0);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
63 assertEquals(section.getEndLine(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
64 assertEquals(section.getEndColumn(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
65 }
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
66
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
67 @Test
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
68 public void emptyLineTest1() {
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
69 SourceSection section = emptyLineSource.createSection("test", 0, 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
70 assertNotNull(section);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
71 assertEquals(section.getCode(), "\n");
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
72 assertEquals(section.getCharIndex(), 0);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
73 assertEquals(section.getCharLength(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
74 assertEquals(section.getStartLine(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
75 assertEquals(section.getStartColumn(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
76 assertEquals(section.getEndLine(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
77 assertEquals(section.getEndColumn(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
78 }
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
79
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
80 @Ignore
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
81 @Test
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
82 public void emptyLineTest2() {
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
83 SourceSection section = emptyLineSource.createSection("test", 1, 0);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
84 assertNotNull(section);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
85 assertEquals(section.getCode(), "");
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
86 assertEquals(section.getCharIndex(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
87 assertEquals(section.getCharLength(), 0);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
88 assertEquals(section.getStartLine(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
89 assertEquals(section.getStartColumn(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
90 assertEquals(section.getEndLine(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
91 assertEquals(section.getEndColumn(), 1);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
92 }
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
93
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
94 @Test
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
95 public void emptySectionTest2() {
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
96 SourceSection section = shortSource.createSection("test", 0, 0);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
97 assertNotNull(section);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
98 assertEquals(section.getCode(), "");
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
99 }
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
100
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
101 @Test
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
102 public void emptySectionTest3() {
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
103 SourceSection section = longSource.createSection("test", 0, 0);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
104 assertNotNull(section);
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
105 assertEquals(section.getCode(), "");
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
106 }
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
107
ae601ad0b023 Truffle/Source: add some tests for SourceSections, including a reported design issue with empty Soruces.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
108 }