コード例 #1
0
 @Test
 public void testFromReader() throws Exception {
   // Same as stubjslint.js.
   String jslint = "function JSLINT() {JSLINT.errors=[];return true}";
   StringReader reader = new StringReader(jslint);
   assertJSLintOK(builder.fromReader(reader, "stubjslint.js"));
 }
コード例 #2
0
 @Test
 public void testFromDefault() throws Exception {
   assertJSLintOK(builder.fromDefault());
 }
コード例 #3
0
 @Test
 public void testFromFile() throws Exception {
   File f = new File(getClass().getClassLoader().getResource(STUB_JSLINT).toURI());
   assertJSLintOK(builder.fromFile(f));
 }
コード例 #4
0
 @Test
 public void testFromClasspathResource() throws Exception {
   assertJSLintOK(builder.fromClasspathResource(STUB_JSLINT));
 }