Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-10-02 03:55:20 +0000
committerRyan D. Brooks2017-10-02 03:55:20 +0000
commit5f0a925f5963f33de5c1d4978c8c5f6b05ed9d98 (patch)
treec62e8834933a6510b7f49c00f6324da38112fa32 /plugins/org.eclipse.osee.orcs.script.dsl.tests
parentf688088e99cf9de396ac9888ad147c40ef58e82e (diff)
downloadorg.eclipse.osee-5f0a925f5963f33de5c1d4978c8c5f6b05ed9d98.tar.gz
org.eclipse.osee-5f0a925f5963f33de5c1d4978c8c5f6b05ed9d98.tar.xz
org.eclipse.osee-5f0a925f5963f33de5c1d4978c8c5f6b05ed9d98.zip
refactor[ats_TSK19352]: Re-format all files
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.script.dsl.tests')
-rw-r--r--plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslFormatterTest.java70
-rw-r--r--plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslParserTest.java35
2 files changed, 53 insertions, 52 deletions
diff --git a/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslFormatterTest.java b/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslFormatterTest.java
index 00cf81493d9..0ff8c63e49c 100644
--- a/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslFormatterTest.java
+++ b/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslFormatterTest.java
@@ -38,44 +38,44 @@ public class OrcsScriptDslFormatterTest {
private static final String INPUT_1 = //
"script-version 0.12.0 ; // a comment" + //
- LN + //
- "start from tx where date in ( '12/24/2014 12:12:12 AM' .. '12/24/2014 12:12:12 AM' )" + //
- "find artifacts where art-type instance-of [23]" + //
- " follow relation type = 324 to side-A ;" + //
- "/**" + LN + //
- " * multi-line comment" + LN + //
- " */ start from branch 570 " + //
- "follow relation type = 324 to side-B" + //
- " find artifacts where art-type = 1231" + //
- " collect artifacts as 'alias-2' { id as 'id-1' , guid as 'id-2' , attributes { uri, txs {*} }, type }" + //
- " limit 34;" + //
- " start from branch 570 " + //
- "follow relation type = 324 to side-B ;" + //
- " start from tx * ;";
+ LN + //
+ "start from tx where date in ( '12/24/2014 12:12:12 AM' .. '12/24/2014 12:12:12 AM' )" + //
+ "find artifacts where art-type instance-of [23]" + //
+ " follow relation type = 324 to side-A ;" + //
+ "/**" + LN + //
+ " * multi-line comment" + LN + //
+ " */ start from branch 570 " + //
+ "follow relation type = 324 to side-B" + //
+ " find artifacts where art-type = 1231" + //
+ " collect artifacts as 'alias-2' { id as 'id-1' , guid as 'id-2' , attributes { uri, txs {*} }, type }" + //
+ " limit 34;" + //
+ " start from branch 570 " + //
+ "follow relation type = 324 to side-B ;" + //
+ " start from tx * ;";
private static final String FORMATTED_INPUT_1 = //
"script-version 0.12.0; // a comment" + LN + //
- LN + //
- "start from tx where date in ('12/24/2014 12:12:12 AM'..'12/24/2014 12:12:12 AM')" + LN + //
- "find artifacts where art-type instance-of [23]" + LN + //
- "follow relation type = 324 to side-A;" + LN + //
- LN + //
- "/**" + LN + //
- " * multi-line comment" + LN + //
- " */" + LN + //
- "start from branch 570" + LN + //
- "follow relation type = 324 to side-B" + LN + //
- "find artifacts where art-type = 1231" + LN + //
- "collect artifacts as 'alias-2' {" + LN + //
- INDENT + "id as 'id-1', guid as 'id-2', attributes {" + LN + //
- INDENT + INDENT + "uri, txs { * }" + LN + //
- INDENT + "}, type" + LN + //
- "} limit 34;" + LN + //
- LN + //
- "start from branch 570" + LN + //
- "follow relation type = 324 to side-B;" + LN + //
- LN + //
- "start from tx *;";
+ LN + //
+ "start from tx where date in ('12/24/2014 12:12:12 AM'..'12/24/2014 12:12:12 AM')" + LN + //
+ "find artifacts where art-type instance-of [23]" + LN + //
+ "follow relation type = 324 to side-A;" + LN + //
+ LN + //
+ "/**" + LN + //
+ " * multi-line comment" + LN + //
+ " */" + LN + //
+ "start from branch 570" + LN + //
+ "follow relation type = 324 to side-B" + LN + //
+ "find artifacts where art-type = 1231" + LN + //
+ "collect artifacts as 'alias-2' {" + LN + //
+ INDENT + "id as 'id-1', guid as 'id-2', attributes {" + LN + //
+ INDENT + INDENT + "uri, txs { * }" + LN + //
+ INDENT + "}, type" + LN + //
+ "} limit 34;" + LN + //
+ LN + //
+ "start from branch 570" + LN + //
+ "follow relation type = 324 to side-B;" + LN + //
+ LN + //
+ "start from tx *;";
@Test
public void testLoadSaveAndWithFormatting() throws Exception {
diff --git a/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslParserTest.java b/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslParserTest.java
index e89bbbf6029..fb54c69c510 100644
--- a/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslParserTest.java
+++ b/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslParserTest.java
@@ -130,12 +130,12 @@ public class OrcsScriptDslParserTest {
// verify.ruleError(OsTxQueryStatement.class, "tx where date = '09/10/2014 11:00'");
String allPredicates = "tx where tx-id = 570" + //
- " and type = [baseline, non-baseline]" + //
- " and comment matches \"122.*?L\"" + //
- " and tx-id != 21123" + //
- " and commit-id is null" + //
- " and author-id = [1231, 123]" + //
- " and date = '09/10/2014 11:00:12 AM'";
+ " and type = [baseline, non-baseline]" + //
+ " and comment matches \"122.*?L\"" + //
+ " and tx-id != 21123" + //
+ " and commit-id is null" + //
+ " and author-id = [1231, 123]" + //
+ " and date = '09/10/2014 11:00:12 AM'";
verify.rule(OsTxQueryStatement.class, allPredicates);
}
@@ -159,11 +159,12 @@ public class OrcsScriptDslParserTest {
verify.rule(OsBranchQueryStatement.class, "branch where type = [working, baseline, merge, system-root, port]");
verify.rule(OsBranchQueryStatement.class, "branch where state = created");
- verify.rule(OsBranchQueryStatement.class, "branch where state = [" + //
- "created, modified, committed, rebaselined, deleted, " + //
- "rebaseline_in_progress, commit_in_progress, creation_in_progress, " + //
- "delete_in_progress, purge_in_progress, purged" + //
- "]");
+ verify.rule(OsBranchQueryStatement.class,
+ "branch where state = [" + //
+ "created, modified, committed, rebaselined, deleted, " + //
+ "rebaseline_in_progress, commit_in_progress, creation_in_progress, " + //
+ "delete_in_progress, purge_in_progress, purged" + //
+ "]");
verify.rule(OsBranchQueryStatement.class, "branch where archived is excluded");
verify.rule(OsBranchQueryStatement.class, "branch where archived is included");
@@ -172,11 +173,11 @@ public class OrcsScriptDslParserTest {
verify.rule(OsBranchQueryStatement.class, "branch where branch is parent-of 567");
String allPredicates = "branch where branch-id = [570, 645]" + //
- " and name matches \"m.*?e\"" + //
- " and type = [working, merge]" + //
- " and state = [created, committed]" + //
- " and archived is excluded" + //
- " and branch is child-of 567";
+ " and name matches \"m.*?e\"" + //
+ " and type = [working, merge]" + //
+ " and state = [created, committed]" + //
+ " and archived is excluded" + //
+ " and branch is child-of 567";
verify.rule(OsBranchQueryStatement.class, allPredicates);
}
@@ -212,7 +213,7 @@ public class OrcsScriptDslParserTest {
"artifacts where attribute type = 570 [match-case, any-order] ['two','one']");
String options = "contains, match-case, ignore-case, not-exists, exists, match-token-count, " + //
- "ignore-token-count, exact-delim, whitespace-delim, any-delim, any-order, match-order";
+ "ignore-token-count, exact-delim, whitespace-delim, any-delim, any-order, match-order";
verify.rule(OsArtifactQueryStatement.class, "artifacts where attribute type = 570 [" + options + "] 'Hello'");
verify.rule(OsArtifactQueryStatement.class,
"artifacts where attribute type = 570 [" + options + "] ['two','one']");

Back to the top