Sha256: b91871195196937d0f61201706854a7676f45803c37ecb2497dadef65dcd57ea
Contents?: true
Size: 1.2 KB
Versions: 21
Compression:
Stored size: 1.2 KB
Contents
package http_parser.lolevel; import http_parser.HTTPParserUrl; import static http_parser.lolevel.Util.*; public class ParseUrl { public static void test(int i) { HTTPParserUrl u = new HTTPParserUrl(); HTTPParser p = new HTTPParser(); Url test = Url.URL_TESTS[i]; // System.out.println(":: " + test.name); int rv = p.parse_url(Util.buffer(test.url),test.is_connect,u); UnitTest.check_equals(rv, test.rv); if(test.rv == 0){ UnitTest.check_equals(u, test.u); } } public static void test() { p(ParseUrl.class); for (int i = 0; i < Url.URL_TESTS.length; i++) { test(i); } } static void usage() { p("usage: [jre] http_parser.lolevel.ParseUrl [i]"); p(" i : optional test case id"); p("---------------------------------------------"); p("Test Cases:"); for (int i =0; i!= Url.URL_TESTS.length; ++i) { p(" "+i+": "+Url.URL_TESTS[i].name); } } public static void main (String [] args) { if (0 == args.length) { test(); } else { try { int i = Integer.parseInt(args[0]); test(i); } catch (Throwable t) { t.printStackTrace(); usage(); } } } }
Version data entries
21 entries across 21 versions & 7 rubygems
Version | Path |
---|---|
http_parser.rb-0.6.0.beta.1 | ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java |