[ create a new paste ] login | about

Link: http://codepad.org/ycttSXjq    [ raw code | fork ]

C, pasted on Sep 25:
		System.assertEquals('0.00', ctl.formatCurrency(0));
		System.assertEquals('0.50', ctl.formatCurrency(0.5));
		System.assertEquals('1.50', ctl.formatCurrency(1.5));
		System.assertEquals('1.00', ctl.formatCurrency(1));
		System.assertEquals('10.00', ctl.formatCurrency(10));
		System.assertEquals('100.00', ctl.formatCurrency(100));
		System.assertEquals('1,000.00', ctl.formatCurrency(1000));
		System.assertEquals('0.00', ctl.formatCurrency(null));
		System.assertEquals('0.00', ctl.formatCurrency(0.001));
		System.assertEquals('0.00', ctl.formatCurrency(0.004));
		System.assertEquals('0.01', ctl.formatCurrency(0.006));
		System.assertEquals('0.10', ctl.formatCurrency(0.1));
		System.assertEquals('1,000.01', ctl.formatCurrency(1000.01));
		System.assertEquals('1,000,000.01', ctl.formatCurrency(1000000.01));
		System.assertEquals('1,000,000,000.01', ctl.formatCurrency(1000000000.01));
		System.assertEquals('-0.10', ctl.formatCurrency(-0.1));
		System.assertEquals('-0.01', ctl.formatCurrency(-0.01));
		System.assertEquals('-1,000,000,000.01', ctl.formatCurrency(-1000000000.01));
		System.assertEquals('0.00', ctl.formatCurrency(-0.001));
		System.assertEquals('0.00', ctl.formatCurrency(-0.005));
		System.assertEquals('0.00', ctl.formatCurrency(0.005));
		System.assertEquals('0.00', ctl.formatCurrency(0.004999));
		System.assertEquals('0.00', ctl.formatCurrency(-0.004999));
		System.assertEquals('-0.01', ctl.formatCurrency(-0.0051));
		System.assertEquals('0.01', ctl.formatCurrency(0.0051));
		System.assertEquals('-1,000,000,000,000.01', ctl.formatCurrency(-1000000000000.0051));
		System.assertEquals('1,000,000,000,000.01', ctl.formatCurrency(1000000000000.0051));

		System.assertEquals('0.02', ctl.formatCurrency(0.0249));
		System.assertEquals('0.02', ctl.formatCurrency(0.025));
		System.assertEquals('0.03', ctl.formatCurrency(0.0251));
		System.assertEquals('0.03', ctl.formatCurrency(0.0349));
		System.assertEquals('0.04', ctl.formatCurrency(0.035));
		System.assertEquals('0.04', ctl.formatCurrency(0.0351));
		System.assertEquals('0.04', ctl.formatCurrency(0.0449));
		System.assertEquals('0.04', ctl.formatCurrency(0.045));
		System.assertEquals('0.05', ctl.formatCurrency(0.0451));
		System.assertEquals('0.05', ctl.formatCurrency(0.0549));
		System.assertEquals('0.06', ctl.formatCurrency(0.055));
		System.assertEquals('0.06', ctl.formatCurrency(0.0551));

		System.assertEquals('-0.02', ctl.formatCurrency(-0.0249));
		System.assertEquals('-0.02', ctl.formatCurrency(-0.025));
		System.assertEquals('-0.03', ctl.formatCurrency(-0.0251));
		System.assertEquals('-0.03', ctl.formatCurrency(-0.0349));
		System.assertEquals('-0.04', ctl.formatCurrency(-0.035));
		System.assertEquals('-0.04', ctl.formatCurrency(-0.0351));
		System.assertEquals('-0.04', ctl.formatCurrency(-0.0449));
		System.assertEquals('-0.04', ctl.formatCurrency(-0.045));
		System.assertEquals('-0.05', ctl.formatCurrency(-0.0451));
		System.assertEquals('-0.05', ctl.formatCurrency(-0.0549));
		System.assertEquals('-0.06', ctl.formatCurrency(-0.055));
		System.assertEquals('-0.06', ctl.formatCurrency(-0.0551));


Create a new paste based on this one


Comments: