Index: vhUnitTest/TECH/NumericDataType/Normalisation/TestBase.cls.xml =================================================================== diff -u -r1771 -r1775 --- vhUnitTest/TECH/NumericDataType/Normalisation/TestBase.cls.xml (.../TestBase.cls.xml) (revision 1771) +++ vhUnitTest/TECH/NumericDataType/Normalisation/TestBase.cls.xml (.../TestBase.cls.xml) (revision 1775) @@ -41,6 +41,22 @@ do $$$AssertEquals(..Scale3,Scale3) ]]> + + + + + + + + Index: TECH/Integer.cls.xml =================================================================== diff -u -r1774 -r1775 --- TECH/Integer.cls.xml (.../Integer.cls.xml) (revision 1774) +++ TECH/Integer.cls.xml (.../Integer.cls.xml) (revision 1775) @@ -57,7 +57,8 @@ Set %code = 0 Quit $$$OK } - Do %code.WriteLine(" Set:$length(Value) i%" _ %property _ " = ##class(TECH.Math).Round(Value,0)") + Do %code.WriteLine(" do:($length(Value))&&('$IsValidNum(Value)) ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New(Value _"" is not a valid INTEGER ""))") + Do %code.WriteLine(" Set i%" _ %property _ " = $select($length(Value):##class(TECH.Math).Round(Value,0),1:"""")") Do %code.WriteLine(" Quit $$$OK") Quit $$$OK ]]> @@ -72,7 +73,9 @@ Set %code = 0 Quit $$$OK } - Do %code.WriteLine(" Quit $select($length(i%"_%property_"):##class(TECH.Math).Round(i%" _ %property_",0),1:"""")") + + Do %code.WriteLine(" Quit:'$IsValidNum(i%"_%property_") i%"_%property) + Do %code.WriteLine(" Quit $select($length(i%"_%property_")&&($IsValidNum(i%"_%property_")):##class(TECH.Math).Round(i%" _ %property_",0),1:"""")") Quit $$$OK ]]> Index: vhUnitTest/TECH/Integer/TestMinMaxVal.cls.xml =================================================================== diff -u -r957 -r1775 --- vhUnitTest/TECH/Integer/TestMinMaxVal.cls.xml (.../TestMinMaxVal.cls.xml) (revision 957) +++ vhUnitTest/TECH/Integer/TestMinMaxVal.cls.xml (.../TestMinMaxVal.cls.xml) (revision 1775) @@ -8,6 +8,14 @@ 1 + +aTestName:%String + + + - + - - -aTestName:%String - - Index: TECH/NumericalDataType.cls.xml =================================================================== diff -u -r1771 -r1775 --- TECH/NumericalDataType.cls.xml (.../NumericalDataType.cls.xml) (revision 1771) +++ TECH/NumericalDataType.cls.xml (.../NumericalDataType.cls.xml) (revision 1775) @@ -14,7 +14,8 @@ Set %code = 0 Quit $$$OK } - Do %code.WriteLine(" Set i%" _ %property _ " = $this." _ %property _ "Normalize(Value)") + Do %code.WriteLine(" do:($length(Value))&&('$IsValidNum(Value)) ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New("""_%class.Name_"."_%property_" : '""_ Value _""' is not a valid value""))") + Do %code.WriteLine(" Set i%" _ %property _ " = $select($length(Value):$this." _ %property _ "Normalize(Value),1:"""")") Do %code.WriteLine(" Quit $$$OK") Quit $$$OK ]]> Index: vhUnitTest/TECH/Integer/General/NormalisationTest.cls.xml =================================================================== diff -u -r1774 -r1775 --- vhUnitTest/TECH/Integer/General/NormalisationTest.cls.xml (.../NormalisationTest.cls.xml) (revision 1774) +++ vhUnitTest/TECH/Integer/General/NormalisationTest.cls.xml (.../NormalisationTest.cls.xml) (revision 1775) @@ -16,6 +16,15 @@ ]]> + + + +