RFR (and sponsor): 7148488: Whitebox tests for the Diagnostic Framework Parser (original) (raw)
Nils Loodin nils.loodin at oracle.com
Thu Mar 15 05:45:06 PDT 2012
- Previous message: RFR 7152798: TEST_BUG: sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java does not compile
- Next message: RFR (and sponsor): 7148488: Whitebox tests for the Diagnostic Framework Parser
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hey all!
Here's an implementation of a nice way of doing parser testing from a jtreg-test, through the whitebox testing framework.
This patch makes it easy to do parser testing (which will be necessary if we want to change it with any sort of confidence in the future) and partly to show off what can be possible to do with the whitebox testing api.
In the added JTREG test, parser testing now works like this from java:
//test that we can parse without exceptions wb.parseCommandLine("myIntArgument=10", args);
//test that the value get's parsed to what we want parse("myIntArgument", "10", "myIntArgument=10", args);
//test that illegal command lines gives exception and aren't silently broken shouldFail("myLongArgument=12m", args); //<-- should fail, doesn't
http://cr.openjdk.java.net/~nloodin/7148488/webrev.00/
Regards, Nils Loodin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20120315/b249ea21/attachment.html
- Previous message: RFR 7152798: TEST_BUG: sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java does not compile
- Next message: RFR (and sponsor): 7148488: Whitebox tests for the Diagnostic Framework Parser
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]