Java Doc for DiagBigDecimal.java in  » Internationalization-Localization » icu4j » com » ibm » icu » dev » test » bigdec » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Internationalization Localization » icu4j » com.ibm.icu.dev.test.bigdec 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.ibm.icu.dev.test.TestFmwk
   com.ibm.icu.dev.test.bigdec.DiagBigDecimal

DiagBigDecimal
public class DiagBigDecimal extends TestFmwk (Code)
The DiagBigDecimal class forms a standalone test suite for the com.ibm.icu.math.BigDecimal and com.ibm.icu.math.MathContext classes (or, by changing the package statement, other classes of the same names and definition in other packages). It may also be used as a constructed object to embed the tests in an external test harness.

The tests are collected into groups, each corresponding to a tested method or a more general grouping. By default, when run from the static DiagBigDecimal.main(java.lang.String[]) method, the run will end if any test fails in a group. The continue argument may be specified to force the tests to run to completion.

Two minor (inner) classes are used; DiagBigDecimal.DiagException is used to signal the failure of a test group, and DiagBigDecimal.Test , a dependent minor class, is used to register tests so that a summary of failures (or success) can be presented as each group is completed.
See Also:   com.ibm.icu.math.BigDecimal
See Also:   com.ibm.icu.math.MathContext
version:
   1.00 2000.03.27
author:
   Mike Cowlishaw


Inner Class :public class Test
Inner Class :public static class DiagException extends java.lang.RuntimeException

Field Summary
 java.util.VectorTests
    
final static  booleanisJDK15OrLater
    

Constructor Summary
public  DiagBigDecimal()
     Constructs a DiagBigDecimal test suite.

Method Summary
public  voidTestBigDecimal()
    
public  voiddiagabs()
     Test the com.ibm.icu.math.BigDecimal.abs method.
public  voiddiagadd()
     Test the com.ibm.icu.math.BigDecimal.add method.
public  voiddiagbyteValue()
     Test the BigDecimal.byteValue() method.
public  voiddiagcompareto()
     Test the com.ibm.icu.math.BigDecimal.compareTo(BigDecimal) method.
public  voiddiagcomparetoObj()
     Test the com.ibm.icu.math.BigDecimal.compareTo(java.lang.Object) method.
public  voiddiagconstructors()
     Test constructors (and DiagBigDecimal.toString() for equalities).
public  voiddiagdivide()
     Test the com.ibm.icu.math.BigDecimal.divide method.
public  voiddiagdivideInteger()
     Test the com.ibm.icu.math.BigDecimal.divideInteger method.
public  voiddiagdoublevalue()
     Test the com.ibm.icu.math.BigDecimal.doubleValue method.
public  voiddiagequals()
     Test the com.ibm.icu.math.BigDecimal.equals method.
public  voiddiagfloatvalue()
     Test the com.ibm.icu.math.BigDecimal.floatValue method.
public  voiddiagformat()
     Test the com.ibm.icu.math.BigDecimal.format method.
public  voiddiaghashcode()
     Test the com.ibm.icu.math.BigDecimal.hashCode method.
public  voiddiagintvalue()
     Test the com.ibm.icu.math.BigDecimal.intValue method.
public  voiddiaglongvalue()
     Test the com.ibm.icu.math.BigDecimal.longValue method.
public  voiddiagmath()
     Test general arithmetic (base operators).

Unlike the specific method tests, these tests were randomly generated by an IBM Object Rexx procedure, then manually corrected for known differences from ANSI X3-274.

public  voiddiagmathcontext()
     Test the com.ibm.icu.math.MathContext class.
public  voiddiagmax()
     Test the com.ibm.icu.math.BigDecimal.max method.
public  voiddiagmin()
     Test the com.ibm.icu.math.BigDecimal.min method.
public  voiddiagmovepointleft()
     Test the com.ibm.icu.math.BigDecimal.movePointLeft method.
public  voiddiagmovepointright()
     Test the com.ibm.icu.math.BigDecimal.movePointRight method.
public  voiddiagmultiply()
     Test the com.ibm.icu.math.BigDecimal.multiply method.
public  voiddiagmutation()
     Mutation tests (checks that contents of constant objects are unchanged).
public  voiddiagnegate()
     Test the com.ibm.icu.math.BigDecimal.negate method.
public  voiddiagplus()
     Test the com.ibm.icu.math.BigDecimal.plus method.
public  voiddiagpow()
     Test the com.ibm.icu.math.BigDecimal.pow method.
public  voiddiagremainder()
     Test the com.ibm.icu.math.BigDecimal.remainder method.
public  intdiagrun(boolean isContinue)
     Run the tests in the test suite.
Parameters:
  isContinue - The boolean which determines whetherto stop running after a group fails.
public  voiddiagscale()
     Test the com.ibm.icu.math.BigDecimal.scale method.
public  voiddiagsetscale()
     Test the com.ibm.icu.math.BigDecimal.setScale method.
public  voiddiagshortvalue()
     Test the BigDecimal.shortValue() method.
public  voiddiagsignum()
     Test the com.ibm.icu.math.BigDecimal.signum method.
public  voiddiagsubtract()
     Test the com.ibm.icu.math.BigDecimal.subtract method.
public  voiddiagtobigdecimal()
     Test the com.ibm.icu.math.BigDecimal.toBigDecimal method.
public  voiddiagtobiginteger()
     Test the com.ibm.icu.math.BigDecimal.toBigInteger method.
public  voiddiagtochararray()
     Test the com.ibm.icu.math.BigDecimal.toCharArray method.
public  voiddiagtostring()
     Test the com.ibm.icu.math.BigDecimal.toString method.
public  voiddiagunscaledvalue()
     Test the com.ibm.icu.math.BigDecimal.unscaledValue method.
public  voiddiagvalueof()
     Test the com.ibm.icu.math.BigDecimal.valueOf method [long and double].
public static  voidmain(String[] args)
     Entry point for stand-alone run.

Field Detail
Tests
java.util.Vector Tests(Code)



isJDK15OrLater
final static boolean isJDK15OrLater(Code)




Constructor Detail
DiagBigDecimal
public DiagBigDecimal()(Code)
Constructs a DiagBigDecimal test suite.

Invoke its DiagBigDecimal.diagrun method to run the tests.





Method Detail
TestBigDecimal
public void TestBigDecimal()(Code)



diagabs
public void diagabs()(Code)
Test the com.ibm.icu.math.BigDecimal.abs method.



diagadd
public void diagadd()(Code)
Test the com.ibm.icu.math.BigDecimal.add method.



diagbyteValue
public void diagbyteValue()(Code)
Test the BigDecimal.byteValue() method.



diagcompareto
public void diagcompareto()(Code)
Test the com.ibm.icu.math.BigDecimal.compareTo(BigDecimal) method.



diagcomparetoObj
public void diagcomparetoObj()(Code)
Test the com.ibm.icu.math.BigDecimal.compareTo(java.lang.Object) method.



diagconstructors
public void diagconstructors()(Code)
Test constructors (and DiagBigDecimal.toString() for equalities).



diagdivide
public void diagdivide()(Code)
Test the com.ibm.icu.math.BigDecimal.divide method.



diagdivideInteger
public void diagdivideInteger()(Code)
Test the com.ibm.icu.math.BigDecimal.divideInteger method.



diagdoublevalue
public void diagdoublevalue()(Code)
Test the com.ibm.icu.math.BigDecimal.doubleValue method.



diagequals
public void diagequals()(Code)
Test the com.ibm.icu.math.BigDecimal.equals method.



diagfloatvalue
public void diagfloatvalue()(Code)
Test the com.ibm.icu.math.BigDecimal.floatValue method.



diagformat
public void diagformat()(Code)
Test the com.ibm.icu.math.BigDecimal.format method.



diaghashcode
public void diaghashcode()(Code)
Test the com.ibm.icu.math.BigDecimal.hashCode method.



diagintvalue
public void diagintvalue()(Code)
Test the com.ibm.icu.math.BigDecimal.intValue method.



diaglongvalue
public void diaglongvalue()(Code)
Test the com.ibm.icu.math.BigDecimal.longValue method.



diagmath
public void diagmath()(Code)
Test general arithmetic (base operators).

Unlike the specific method tests, these tests were randomly generated by an IBM Object Rexx procedure, then manually corrected for known differences from ANSI X3-274. These differences are:

  1. the trigger point in exponential notation is fixed in ANSI X3-274 but varies with DIGITS in Classic and Object Rexx
  2. some trailing zeros were missing (e.g., 1.3 + 1E-60 should show seven trailing zeros)
  3. the power operator is less accurate in Object Rexx
  4. ANSI X3-274 [errata 1999] rounds input numbers to DIGITS (rather than truncating to DIGITS+1).



diagmathcontext
public void diagmathcontext()(Code)
Test the com.ibm.icu.math.MathContext class.



diagmax
public void diagmax()(Code)
Test the com.ibm.icu.math.BigDecimal.max method.



diagmin
public void diagmin()(Code)
Test the com.ibm.icu.math.BigDecimal.min method.



diagmovepointleft
public void diagmovepointleft()(Code)
Test the com.ibm.icu.math.BigDecimal.movePointLeft method.



diagmovepointright
public void diagmovepointright()(Code)
Test the com.ibm.icu.math.BigDecimal.movePointRight method.



diagmultiply
public void diagmultiply()(Code)
Test the com.ibm.icu.math.BigDecimal.multiply method.



diagmutation
public void diagmutation()(Code)
Mutation tests (checks that contents of constant objects are unchanged).



diagnegate
public void diagnegate()(Code)
Test the com.ibm.icu.math.BigDecimal.negate method.



diagplus
public void diagplus()(Code)
Test the com.ibm.icu.math.BigDecimal.plus method.



diagpow
public void diagpow()(Code)
Test the com.ibm.icu.math.BigDecimal.pow method.



diagremainder
public void diagremainder()(Code)
Test the com.ibm.icu.math.BigDecimal.remainder method.



diagrun
public int diagrun(boolean isContinue)(Code)
Run the tests in the test suite.
Parameters:
  isContinue - The boolean which determines whetherto stop running after a group fails. If 1 (true)then the tests should be run to completion ifpossible; if 0 (false) then the run will end if agroup fails. an int which is 0 if all tests weresuccessful, >0 (the count of failures) if some failures weredetected, or <0 if an unexpected Exception was signalled.



diagscale
public void diagscale()(Code)
Test the com.ibm.icu.math.BigDecimal.scale method.



diagsetscale
public void diagsetscale()(Code)
Test the com.ibm.icu.math.BigDecimal.setScale method.



diagshortvalue
public void diagshortvalue()(Code)
Test the BigDecimal.shortValue() method.



diagsignum
public void diagsignum()(Code)
Test the com.ibm.icu.math.BigDecimal.signum method.



diagsubtract
public void diagsubtract()(Code)
Test the com.ibm.icu.math.BigDecimal.subtract method.



diagtobigdecimal
public void diagtobigdecimal()(Code)
Test the com.ibm.icu.math.BigDecimal.toBigDecimal method.



diagtobiginteger
public void diagtobiginteger()(Code)
Test the com.ibm.icu.math.BigDecimal.toBigInteger method.



diagtochararray
public void diagtochararray()(Code)
Test the com.ibm.icu.math.BigDecimal.toCharArray method.



diagtostring
public void diagtostring()(Code)
Test the com.ibm.icu.math.BigDecimal.toString method.



diagunscaledvalue
public void diagunscaledvalue()(Code)
Test the com.ibm.icu.math.BigDecimal.unscaledValue method.



diagvalueof
public void diagvalueof()(Code)
Test the com.ibm.icu.math.BigDecimal.valueOf method [long and double].



main
public static void main(String[] args) throws Exception(Code)
Entry point for stand-alone run. It constructs a DiagBigDecimal object and then invokes its DiagBigDecimal.diagrun(boolean) method to run the test suite.
Parameters:
  args - The command line argument string array.if the first word is 'continue' then try and runall tests, otherwise stop after the first failing test group.



Fields inherited from com.ibm.icu.dev.test.TestFmwk
protected TestParams params(Code)(Java Doc)

Methods inherited from com.ibm.icu.dev.test.TestFmwk
protected boolean assertEquals(String message, boolean expected, boolean actual)(Code)(Java Doc)
protected boolean assertEquals(String message, long expected, long actual)(Code)(Java Doc)
protected boolean assertEquals(String message, float expected, float actual, double error)(Code)(Java Doc)
protected boolean assertEquals(String message, double expected, double actual, double error)(Code)(Java Doc)
protected boolean assertEquals(String message, Object expected, Object actual)(Code)(Java Doc)
protected boolean assertFalse(String message, boolean condition)(Code)(Java Doc)
protected boolean assertNotEquals(String message, Object expected, Object actual)(Code)(Java Doc)
protected boolean assertNotNull(String message, Object actual)(Code)(Java Doc)
protected boolean assertNotSame(String message, Object expected, Object actual)(Code)(Java Doc)
protected boolean assertNull(String message, Object actual)(Code)(Java Doc)
protected boolean assertSame(String message, Object expected, Object actual)(Code)(Java Doc)
protected boolean assertTrue(String message, boolean condition)(Code)(Java Doc)
protected int checkArray(String msg, String array, String expected)(Code)(Java Doc)
protected int checkArray(String msg, Locale array, String expected)(Code)(Java Doc)
protected int checkArray(String msg, ULocale array, String expected)(Code)(Java Doc)
protected Random createRandom()(Code)(Java Doc)
protected void fail(String message)(Code)(Java Doc)
protected static synchronized java.util.Date getDate(int year, int month, int dom)(Code)(Java Doc)
protected String getDescription()(Code)(Java Doc)
protected int getErrorCount()(Code)(Java Doc)
public PrintWriter getErrorLogPrintWriter()(Code)(Java Doc)
public int getInclusion()(Code)(Java Doc)
public PrintWriter getLogPrintWriter()(Code)(Java Doc)
protected String getMethodDescription(String name)(Code)(Java Doc)
protected TestFmwk getSubtest(String prefix) throws TestFmwkException(Code)(Java Doc)
protected Target getTargets(String targetName)(Code)(Java Doc)
public String getTranslitTestFilter()(Code)(Java Doc)
protected void handleException(Throwable e)(Code)(Java Doc)
public static String hex(char[] s)(Code)(Java Doc)
public static String hex(byte[] s)(Code)(Java Doc)
public static String hex(char ch)(Code)(Java Doc)
public static String hex(int ch)(Code)(Java Doc)
public static String hex(String s)(Code)(Java Doc)
public static String hex(StringBuffer s)(Code)(Java Doc)
protected void init() throws Exception(Code)(Java Doc)
public boolean isDateAtLeast(int year, int month, int day)(Code)(Java Doc)
public boolean isMemTracking()(Code)(Java Doc)
public boolean isModularBuild()(Code)(Java Doc)
public boolean isQuick()(Code)(Java Doc)
public boolean isTiming()(Code)(Java Doc)
public boolean isVerbose()(Code)(Java Doc)
public void msg(String message, int level, boolean incCount, boolean newln)(Code)(Java Doc)
public boolean noData()(Code)(Java Doc)
public static String prettify(String s)(Code)(Java Doc)
public static String prettify(StringBuffer s)(Code)(Java Doc)
public Target resolveTarget(TestParams params)(Code)(Java Doc)
public Target resolveTarget(TestParams params, String targetPath)(Code)(Java Doc)
public void run(String[] args)(Code)(Java Doc)
public int run(String[] args, PrintWriter log)(Code)(Java Doc)
public int runTests(TestParams params, String[] tests)(Code)(Java Doc)
protected TimeZone safeGetTimeZone(String id)(Code)(Java Doc)
public void usage()(Code)(Java Doc)
public static void usage(PrintWriter pw, String className)(Code)(Java Doc)
protected boolean validate()(Code)(Java Doc)
protected boolean validateMethod(String name)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.