Lines Matching full:number
28 // Test number predicates that Harmony adds to the Number constructor:
31 assertTrue(Number.isFinite(0));
32 assertTrue(Number.isFinite(Number.MIN_VALUE));
33 assertTrue(Number.isFinite(Number.MAX_VALUE));
34 assertTrue(Number.isFinite(Number.MIN_SAFE_INTEGER));
35 assertTrue(Number.isFinite(Number.MIN_SAFE_INTEGER - 13));
36 assertTrue(Number.isFinite(Number.MAX_SAFE_INTEGER));
37 assertTrue(Number.isFinite(Number.MAX_SAFE_INTEGER + 23));
38 assertFalse(Number.isFinite(Number.NaN));
39 assertFalse(Number.isFinite(Number.POSITIVE_INFINITY));
40 assertFalse(Number.isFinite(Number.NEGATIVE_INFINITY));
41 assertFalse(Number.isFinite(new Number(0)));
42 assertFalse(Number.isFinite(1/0));
43 assertFalse(Number.isFinite(-1/0));
44 assertFalse(Number.isFinite({}));
45 assertFalse(Number.isFinite([]));
46 assertFalse(Number.isFinite("s"));
47 assertFalse(Number.isFinite(null));
48 assertFalse(Number.isFinite(undefined));
50 assertFalse(Number.isNaN(0));
51 assertFalse(Number.isNaN(Number.MIN_VALUE));
52 assertFalse(Number.isNaN(Number.MAX_VALUE));
53 assertFalse(Number.isNaN(Number.MIN_SAFE_INTEGER - 13));
54 assertFalse(Number.isNaN(Number.MAX_SAFE_INTEGER + 23));
55 assertTrue(Number.isNaN(Number.NaN));
56 assertFalse(Number.isNaN(Number.POSITIVE_INFINITY));
57 assertFalse(Number.isNaN(Number.NEGATIVE_INFINITY));
58 assertFalse(Number.isNaN(Number.EPSILON));
59 assertFalse(Number.isNaN(new Number(0)));
60 assertFalse(Number.isNaN(1/0));
61 assertFalse(Number.isNaN(-1/0));
62 assertFalse(Number.isNaN({}));
63 assertFalse(Number.isNaN([]));
64 assertFalse(Number.isNaN("s"));
65 assertFalse(Number.isNaN(null));
66 assertFalse(Number.isNaN(undefined));
68 assertFalse(Number.isInteger({}));
69 assertFalse(Number.isInteger([]));
70 assertFalse(Number.isInteger("s"));
71 assertFalse(Number.isInteger(null));
72 assertFalse(Number.isInteger(undefined));
73 assertFalse(Number.isInteger(new Number(2)));
74 assertTrue(Number.isInteger(0));
75 assertFalse(Number.isInteger(Number.MIN_VALUE));
76 assertTrue(Number.isInteger(Number.MAX_VALUE));
77 assertTrue(Number.isInteger(Number.MIN_SAFE_INTEGER));
78 assertTrue(Number.isInteger(Number.MIN_SAFE_INTEGER - 13));
79 assertTrue(Number.isInteger(Number.MAX_SAFE_INTEGER));
80 assertTrue(Number.isInteger(Number.MAX_SAFE_INTEGER + 23));
81 assertFalse(Number.isInteger(Number.NaN));
82 assertFalse(Number.isInteger(Number.POSITIVE_INFINITY));
83 assertFalse(Number.isInteger(Number.NEGATIVE_INFINITY));
84 assertFalse(Number.isInteger(1/0));
85 assertFalse(Number.isInteger(-1/0));
86 assertFalse(Number.isInteger(Number.EPSILON));
88 assertFalse(Number.isSafeInteger({}));
89 assertFalse(Number.isSafeInteger([]));
90 assertFalse(Number.isSafeInteger("s"));
91 assertFalse(Number.isSafeInteger(null));
92 assertFalse(Number.isSafeInteger(undefined));
93 assertFalse(Number.isSafeInteger(new Number(2)));
94 assertTrue(Number.isSafeInteger(0));
95 assertTrue(Number.isSafeInteger(Number.MIN_SAFE_INTEGER));
96 assertFalse(Number.isSafeInteger(Number.MIN_SAFE_INTEGER - 13));
97 assertTrue(Number.isSafeInteger(Number.MIN_SAFE_INTEGER + 13));
98 assertTrue(Number.isSafeInteger(Number.MAX_SAFE_INTEGER));
99 assertFalse(Number.isSafeInteger(Number.MAX_SAFE_INTEGER + 23));
100 assertTrue(Number.isSafeInteger(Number.MAX_SAFE_INTEGER - 23));
101 assertFalse(Number.isSafeInteger(Number.MIN_VALUE));
102 assertFalse(Number.isSafeInteger(Number.MAX_VALUE));
103 assertFalse(Number.isSafeInteger(Number.NaN));
104 assertFalse(Number.isSafeInteger(Number.POSITIVE_INFINITY));
105 assertFalse(Number.isSafeInteger(Number.NEGATIVE_INFINITY));
106 assertFalse(Number.isSafeInteger(1/0));
107 assertFalse(Number.isSafeInteger(-1/0));
108 assertFalse(Number.isSafeInteger(Number.EPSILON));
111 assertTrue(Number.isSafeInteger(near_upper));
112 assertFalse(Number.isSafeInteger(2 * near_upper));
113 assertTrue(Number.isSafeInteger(2 * near_upper - 1));
114 assertTrue(Number.isSafeInteger(2 * near_upper - 2));
115 assertFalse(Number.isSafeInteger(2 * near_upper + 1));
116 assertFalse(Number.isSafeInteger(2 * near_upper + 2));
117 assertFalse(Number.isSafeInteger(2 * near_upper + 7));
120 assertTrue(Number.isSafeInteger(near_lower));
121 assertFalse(Number.isSafeInteger(2 * near_lower));
122 assertTrue(Number.isSafeInteger(2 * near_lower + 1));
123 assertTrue(Number.isSafeInteger(2 * near_lower + 2));
124 assertFalse(Number.isSafeInteger(2 * near_lower - 1));
125 assertFalse(Number.isSafeInteger(2 * near_lower - 2));
126 assertFalse(Number.isSafeInteger(2 * near_lower - 7));