< prev index next >

test/tools/launcher/modules/addexports/AddExportsTestWarningError.java

Print this page




 117             { "/p1=m2",     "Unable to parse --add-exports <module>/<package>: /p1" },
 118             { "m1p1=m2",    "Unable to parse --add-exports <module>/<package>: m1p1" },
 119 
 120             // empty list, missing target
 121             { "m1/p1=",     "Unable to parse --add-exports <module>=<value>: m1/p1=" },
 122             { "m1/p1=,,",   "Target must be specified: --add-exports m1/p1=,," },
 123         };
 124     }
 125 
 126     @Test(dataProvider = "illFormedAddExports")
 127     public void testIllFormedAddExports(String value, String msg) throws Exception {
 128         testError(value, msg);
 129     }
 130 
 131 
 132     @DataProvider(name = "unknownNames")
 133     public Object[][] unknownNames() {
 134         return new Object[][]{
 135 
 136             // source not found
 137             {"DoesNotExist/p=m1",  "WARNING: Unknown module: DoesNotExist specified in --add-exports"},
 138             {"m1/DoesNotExist=m2", "WARNING: package DoesNotExist not in m1"},
 139 
 140             // target not found
 141             {"m1/p1=DoesNotExist", "WARNING: Unknown module: DoesNotExist specified in --add-exports"},
 142 
 143             // bad names
 144             {"m*/p1=m2",           "WARNING: Unknown module: m* specified in --add-exports"},
 145             {"m1/p!=m2",           "WARNING: package p! not in m1"},
 146             {"m1/p1=m!",           "WARNING: Unknown module: m! specified in --add-exports"},
 147 
 148         };
 149     }
 150 
 151 
 152     @Test(dataProvider = "unknownNames")
 153     public void testUnknownNames(String value, String msg) throws Exception {
 154         testWarning(value, msg);
 155     }
 156 
 157 
 158     @DataProvider(name = "missingArguments")
 159     public Object[][] missingArguments() {
 160         return new Object[][]{
 161             { new String[] { "--add-exports" },
 162                 "Error: --add-exports requires modules to be specified"},
 163 
 164             { new String[] { "--add-exports=" },
 165                 "Error: --add-exports= requires modules to be specified" },
 166 




 117             { "/p1=m2",     "Unable to parse --add-exports <module>/<package>: /p1" },
 118             { "m1p1=m2",    "Unable to parse --add-exports <module>/<package>: m1p1" },
 119 
 120             // empty list, missing target
 121             { "m1/p1=",     "Unable to parse --add-exports <module>=<value>: m1/p1=" },
 122             { "m1/p1=,,",   "Target must be specified: --add-exports m1/p1=,," },
 123         };
 124     }
 125 
 126     @Test(dataProvider = "illFormedAddExports")
 127     public void testIllFormedAddExports(String value, String msg) throws Exception {
 128         testError(value, msg);
 129     }
 130 
 131 
 132     @DataProvider(name = "unknownNames")
 133     public Object[][] unknownNames() {
 134         return new Object[][]{
 135 
 136             // source not found
 137             {"DoesNotExist/p=m1",  "WARNING: Unknown module: DoesNotExist specified to --add-exports"},
 138             {"m1/DoesNotExist=m2", "WARNING: package DoesNotExist not in m1"},
 139 
 140             // target not found
 141             {"m1/p1=DoesNotExist", "WARNING: Unknown module: DoesNotExist specified to --add-exports"},
 142 
 143             // bad names
 144             {"m*/p1=m2",           "WARNING: Unknown module: m* specified to --add-exports"},
 145             {"m1/p!=m2",           "WARNING: package p! not in m1"},
 146             {"m1/p1=m!",           "WARNING: Unknown module: m! specified to --add-exports"},
 147 
 148         };
 149     }
 150 
 151 
 152     @Test(dataProvider = "unknownNames")
 153     public void testUnknownNames(String value, String msg) throws Exception {
 154         testWarning(value, msg);
 155     }
 156 
 157 
 158     @DataProvider(name = "missingArguments")
 159     public Object[][] missingArguments() {
 160         return new Object[][]{
 161             { new String[] { "--add-exports" },
 162                 "Error: --add-exports requires modules to be specified"},
 163 
 164             { new String[] { "--add-exports=" },
 165                 "Error: --add-exports= requires modules to be specified" },
 166 


< prev index next >