Lines Matching defs:ai
32 LongAdder ai = new LongAdder();
33 assertEquals(0, ai.sum());
40 LongAdder ai = new LongAdder();
41 ai.add(2);
42 assertEquals(2, ai.sum());
43 ai.add(-4);
44 assertEquals(-2, ai.sum());
51 LongAdder ai = new LongAdder();
52 ai.decrement();
53 assertEquals(-1, ai.sum());
54 ai.decrement();
55 assertEquals(-2, ai.sum());
62 LongAdder ai = new LongAdder();
63 ai.increment();
64 assertEquals(1, ai.sum());
65 ai.increment();
66 assertEquals(2, ai.sum());
73 LongAdder ai = new LongAdder();
74 ai.add(2);
75 assertEquals(2, ai.sum());
76 ai.reset();
77 assertEquals(0, ai.sum());
84 LongAdder ai = new LongAdder();
85 ai.add(2);
86 assertEquals(2, ai.sum());
87 assertEquals(2, ai.sumThenReset());
88 assertEquals(0, ai.sum());
110 LongAdder ai = new LongAdder();
111 assertEquals("0", ai.toString());
112 ai.increment();
113 assertEquals(Long.toString(1), ai.toString());
120 LongAdder ai = new LongAdder();
121 assertEquals(0, ai.intValue());
122 ai.increment();
123 assertEquals(1, ai.intValue());
130 LongAdder ai = new LongAdder();
131 assertEquals(0, ai.longValue());
132 ai.increment();
133 assertEquals(1, ai.longValue());
140 LongAdder ai = new LongAdder();
141 assertEquals(0.0f, ai.floatValue());
142 ai.increment();
143 assertEquals(1.0f, ai.floatValue());
150 LongAdder ai = new LongAdder();
151 assertEquals(0.0, ai.doubleValue());
152 ai.increment();
153 assertEquals(1.0, ai.doubleValue());