22// for details. All rights reserved. Use of this source code is governed by a
33// BSD-style license that can be found in the LICENSE file.
44
5- // ignore_for_file: prefer_const_constructors
6-
75import 'package:fixnum/fixnum.dart' ;
86import 'package:test/test.dart' ;
97
@@ -86,8 +84,10 @@ void main() {
8684 expect (n3 * n2, Int32 (- 12186984 ));
8785 expect (Int32 (0x12345678 ) * Int32 (0x22222222 ), Int32 (- 899716112 ));
8886 expect (Int32 (123456789 ) * Int32 (987654321 ), Int32 (- 67153019 ));
89- expect (Int32 (0x12345678 ) * Int64 (0x22222222 ),
90- Int64 .fromInts (0x026D60DC , 0xCA5F6BF0 ));
87+ expect (
88+ Int32 (0x12345678 ) * Int64 (0x22222222 ),
89+ Int64 .fromInts (0x026D60DC , 0xCA5F6BF0 ),
90+ );
9191 expect (Int32 (123456789 ) * 987654321 , Int32 (- 67153019 ));
9292 });
9393
@@ -106,16 +106,26 @@ void main() {
106106 });
107107
108108 test ('remainder' , () {
109- expect (Int32 (0x12345678 ).remainder (Int32 (0x22 )),
110- Int32 (0x12345678 .remainder (0x22 )));
111- expect (Int32 (0x12345678 ).remainder (Int32 (- 0x22 )),
112- Int32 (0x12345678 .remainder (- 0x22 )));
113- expect (Int32 (- 0x12345678 ).remainder (Int32 (- 0x22 )),
114- Int32 (- 0x12345678 .remainder (- 0x22 )));
115- expect (Int32 (- 0x12345678 ).remainder (Int32 (0x22 )),
116- Int32 (- 0x12345678 .remainder (0x22 )));
117- expect (Int32 (0x12345678 ).remainder (Int64 (0x22 )),
118- Int32 (0x12345678 .remainder (0x22 )));
109+ expect (
110+ Int32 (0x12345678 ).remainder (Int32 (0x22 )),
111+ Int32 (0x12345678 .remainder (0x22 )),
112+ );
113+ expect (
114+ Int32 (0x12345678 ).remainder (Int32 (- 0x22 )),
115+ Int32 (0x12345678 .remainder (- 0x22 )),
116+ );
117+ expect (
118+ Int32 (- 0x12345678 ).remainder (Int32 (- 0x22 )),
119+ Int32 (- 0x12345678 .remainder (- 0x22 )),
120+ );
121+ expect (
122+ Int32 (- 0x12345678 ).remainder (Int32 (0x22 )),
123+ Int32 (- 0x12345678 .remainder (0x22 )),
124+ );
125+ expect (
126+ Int32 (0x12345678 ).remainder (Int64 (0x22 )),
127+ Int32 (0x12345678 .remainder (0x22 )),
128+ );
119129 });
120130
121131 test ('abs' , () {
@@ -241,24 +251,36 @@ void main() {
241251
242252 group ('bitwise operators' , () {
243253 test ('&' , () {
244- expect (Int32 (0x12345678 ) & Int32 (0x22222222 ),
245- Int32 (0x12345678 & 0x22222222 ));
246- expect (Int32 (0x12345678 ) & Int64 (0x22222222 ),
247- Int64 (0x12345678 & 0x22222222 ));
254+ expect (
255+ Int32 (0x12345678 ) & Int32 (0x22222222 ),
256+ Int32 (0x12345678 & 0x22222222 ),
257+ );
258+ expect (
259+ Int32 (0x12345678 ) & Int64 (0x22222222 ),
260+ Int64 (0x12345678 & 0x22222222 ),
261+ );
248262 });
249263
250264 test ('|' , () {
251- expect (Int32 (0x12345678 ) | Int32 (0x22222222 ),
252- Int32 (0x12345678 | 0x22222222 ));
253- expect (Int32 (0x12345678 ) | Int64 (0x22222222 ),
254- Int64 (0x12345678 | 0x22222222 ));
265+ expect (
266+ Int32 (0x12345678 ) | Int32 (0x22222222 ),
267+ Int32 (0x12345678 | 0x22222222 ),
268+ );
269+ expect (
270+ Int32 (0x12345678 ) | Int64 (0x22222222 ),
271+ Int64 (0x12345678 | 0x22222222 ),
272+ );
255273 });
256274
257275 test ('^' , () {
258- expect (Int32 (0x12345678 ) ^ Int32 (0x22222222 ),
259- Int32 (0x12345678 ^ 0x22222222 ));
260- expect (Int32 (0x12345678 ) ^ Int64 (0x22222222 ),
261- Int64 (0x12345678 ^ 0x22222222 ));
276+ expect (
277+ Int32 (0x12345678 ) ^ Int32 (0x22222222 ),
278+ Int32 (0x12345678 ^ 0x22222222 ),
279+ );
280+ expect (
281+ Int32 (0x12345678 ) ^ Int64 (0x22222222 ),
282+ Int64 (0x12345678 ^ 0x22222222 ),
283+ );
262284 });
263285
264286 test ('~' , () {
0 commit comments