Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/source/SourceTest.java @ 20906:c8b83aa6cc82
Truffle/Source: remove proposed standard SourceTags; migrate the tags related to Source provenance into thte Source class.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Mon, 13 Apr 2015 10:55:15 -0700 |
parents | 191c55f08ed2 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/source/SourceTest.java Sun Apr 12 22:37:16 2015 -0700 +++ b/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/source/SourceTest.java Mon Apr 13 10:55:15 2015 -0700 @@ -54,9 +54,9 @@ // Initially has only the default tag assertEquals(source.getSourceTags().size(), 1); - assertTrue(source.getSourceTags().contains(StandardSourceTag.FROM_LITERAL)); - assertTrue(source.isTaggedAs(StandardSourceTag.FROM_LITERAL)); - assertTrue(Source.findSourcesTaggedAs(StandardSourceTag.FROM_LITERAL).contains(source)); + assertTrue(source.getSourceTags().contains(Source.Tags.FROM_LITERAL)); + assertTrue(source.isTaggedAs(Source.Tags.FROM_LITERAL)); + assertTrue(Source.findSourcesTaggedAs(Source.Tags.FROM_LITERAL).contains(source)); assertFalse(source.isTaggedAs(testTag)); assertEquals(Source.findSourcesTaggedAs(testTag).size(), 0); @@ -67,9 +67,9 @@ // Now there are exactly two tags assertEquals(source.getSourceTags().size(), 2); - assertTrue(source.getSourceTags().contains(StandardSourceTag.FROM_LITERAL)); - assertTrue(source.isTaggedAs(StandardSourceTag.FROM_LITERAL)); - assertTrue(Source.findSourcesTaggedAs(StandardSourceTag.FROM_LITERAL).contains(source)); + assertTrue(source.getSourceTags().contains(Source.Tags.FROM_LITERAL)); + assertTrue(source.isTaggedAs(Source.Tags.FROM_LITERAL)); + assertTrue(Source.findSourcesTaggedAs(Source.Tags.FROM_LITERAL).contains(source)); assertTrue(source.getSourceTags().contains(testTag)); assertTrue(source.isTaggedAs(testTag)); @@ -82,9 +82,9 @@ // Nothing has changed assertEquals(source.getSourceTags().size(), 2); - assertTrue(source.getSourceTags().contains(StandardSourceTag.FROM_LITERAL)); - assertTrue(source.isTaggedAs(StandardSourceTag.FROM_LITERAL)); - assertTrue(Source.findSourcesTaggedAs(StandardSourceTag.FROM_LITERAL).contains(source)); + assertTrue(source.getSourceTags().contains(Source.Tags.FROM_LITERAL)); + assertTrue(source.isTaggedAs(Source.Tags.FROM_LITERAL)); + assertTrue(Source.findSourcesTaggedAs(Source.Tags.FROM_LITERAL).contains(source)); assertTrue(source.getSourceTags().contains(testTag)); assertTrue(source.isTaggedAs(testTag)); @@ -135,7 +135,7 @@ assertEquals(newSource[0], source); assertEquals(newTagEvents[0], 1); assertEquals(taggedSource[0], source); - assertEquals(newTag[0], StandardSourceTag.FROM_LITERAL); + assertEquals(newTag[0], Source.Tags.FROM_LITERAL); // reset newSource[0] = null;