64 private static final String[][] FILE_EXPECTED_OUTPUT = { |
64 private static final String[][] FILE_EXPECTED_OUTPUT = { |
65 { |
65 { |
66 "CompileCommand: option com/oracle/Test.test bool MyBoolOption1 = true", |
66 "CompileCommand: option com/oracle/Test.test bool MyBoolOption1 = true", |
67 "CompileCommand: option com/oracle/Test.test bool MyBoolOption2 = true", |
67 "CompileCommand: option com/oracle/Test.test bool MyBoolOption2 = true", |
68 "CompileCommand: option com/oracle/Test.test bool MyBoolOption3 = true", |
68 "CompileCommand: option com/oracle/Test.test bool MyBoolOption3 = true", |
69 "CompileCommand: option com/oracle/Test.test bool MyBoolOption4 = true", |
|
70 "CompileCommand: option com/oracle/Test.test bool MyBoolOption5 = true", |
69 "CompileCommand: option com/oracle/Test.test bool MyBoolOption5 = true", |
71 "CompileCommand: option com/oracle/Test.test bool MyBoolOption6 = true", |
70 "CompileCommand: option com/oracle/Test.test bool MyBoolOption6 = true", |
72 "CompileCommand: option com/oracle/Test.test bool MyBoolOption7 = true", |
71 "CompileCommand: option com/oracle/Test.test bool MyBoolOption7 = true", |
73 "CompileCommand: option com/oracle/Test.test bool MyBoolOption8 = true", |
72 "CompileCommand: option com/oracle/Test.test bool MyBoolOption8 = true", |
74 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption9 = true", |
73 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption9 = true", |
75 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption10 = true", |
74 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption10 = true", |
76 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption11 = true", |
75 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption11 = true", |
77 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption12 = true", |
|
78 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption13 = true", |
76 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption13 = true", |
79 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption14 = true", |
77 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption14 = true", |
80 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption15 = true", |
78 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption15 = true", |
81 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption16 = true" |
79 "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption16 = true" |
82 }, |
80 }, |
94 private static final String[][] TYPE_1_ARGUMENTS = { |
92 private static final String[][] TYPE_1_ARGUMENTS = { |
95 { |
93 { |
96 "-XX:CompileCommand=option,com/oracle/Test.test,MyBoolOption1", |
94 "-XX:CompileCommand=option,com/oracle/Test.test,MyBoolOption1", |
97 "-XX:CompileCommand=option,com/oracle/Test,test,MyBoolOption2", |
95 "-XX:CompileCommand=option,com/oracle/Test,test,MyBoolOption2", |
98 "-XX:CompileCommand=option,com.oracle.Test::test,MyBoolOption3", |
96 "-XX:CompileCommand=option,com.oracle.Test::test,MyBoolOption3", |
99 "-XX:CompileCommand=option,com/oracle/Test::test,MyBoolOption4", |
|
100 "-XX:CompileCommand=option,com/oracle/Test.test,MyBoolOption5,MyBoolOption6", |
97 "-XX:CompileCommand=option,com/oracle/Test.test,MyBoolOption5,MyBoolOption6", |
101 "-XX:CompileCommand=option,com/oracle/Test,test,MyBoolOption7,MyBoolOption8", |
98 "-XX:CompileCommand=option,com/oracle/Test,test,MyBoolOption7,MyBoolOption8", |
102 "-version" |
99 "-version" |
103 } |
100 } |
104 }; |
101 }; |
106 private static final String[][] TYPE_1_EXPECTED_OUTPUTS = { |
103 private static final String[][] TYPE_1_EXPECTED_OUTPUTS = { |
107 { |
104 { |
108 "CompileCommand: option com/oracle/Test.test bool MyBoolOption1 = true", |
105 "CompileCommand: option com/oracle/Test.test bool MyBoolOption1 = true", |
109 "CompileCommand: option com/oracle/Test.test bool MyBoolOption2 = true", |
106 "CompileCommand: option com/oracle/Test.test bool MyBoolOption2 = true", |
110 "CompileCommand: option com/oracle/Test.test bool MyBoolOption3 = true", |
107 "CompileCommand: option com/oracle/Test.test bool MyBoolOption3 = true", |
111 "CompileCommand: option com/oracle/Test.test bool MyBoolOption4 = true", |
|
112 "CompileCommand: option com/oracle/Test.test bool MyBoolOption5 = true", |
108 "CompileCommand: option com/oracle/Test.test bool MyBoolOption5 = true", |
113 "CompileCommand: option com/oracle/Test.test bool MyBoolOption6 = true", |
109 "CompileCommand: option com/oracle/Test.test bool MyBoolOption6 = true", |
114 "CompileCommand: option com/oracle/Test.test bool MyBoolOption7 = true", |
110 "CompileCommand: option com/oracle/Test.test bool MyBoolOption7 = true", |
115 "CompileCommand: option com/oracle/Test.test bool MyBoolOption8 = true" |
111 "CompileCommand: option com/oracle/Test.test bool MyBoolOption8 = true" |
116 } |
112 } |
196 |
192 |
197 for (String expected_output : expected_outputs) { |
193 for (String expected_output : expected_outputs) { |
198 out.shouldContain(expected_output); |
194 out.shouldContain(expected_output); |
199 } |
195 } |
200 |
196 |
201 out.shouldNotContain("CompileCommand: An error occured during parsing"); |
197 out.shouldNotContain("CompileCommand: An error occurred during parsing"); |
202 out.shouldHaveExitValue(0); |
198 out.shouldHaveExitValue(0); |
203 } |
199 } |
204 |
200 |
205 private static void verifyInvalidOption(String[] arguments) throws Exception { |
201 private static void verifyInvalidOption(String[] arguments) throws Exception { |
206 ProcessBuilder pb; |
202 ProcessBuilder pb; |
207 OutputAnalyzer out; |
203 OutputAnalyzer out; |
208 |
204 |
209 pb = ProcessTools.createJavaProcessBuilder(arguments); |
205 pb = ProcessTools.createJavaProcessBuilder(arguments); |
210 out = new OutputAnalyzer(pb.start()); |
206 out = new OutputAnalyzer(pb.start()); |
211 |
207 |
212 out.shouldContain("CompileCommand: An error occured during parsing"); |
208 out.shouldContain("CompileCommand: An error occurred during parsing"); |
213 out.shouldHaveExitValue(0); |
209 out.shouldHaveExitValue(0); |
214 } |
210 } |
215 |
211 |
216 public static void main(String[] args) throws Exception { |
212 public static void main(String[] args) throws Exception { |
217 |
213 |