// See https://pub.dartlang.org/packages/test import "package:test/test.dart"; import "package:solution/solution.dart"; import "dart:math"; void main() { group("Tests", () { test('1+1=', ()=> expect(addition(1, 1), equals(2))); test('2+0=', ()=> expect(addition(2, 0), equals(2))); test('123+321=', ()=> expect(addition(123, 321), equals(444))); Random r = Random(); int a = r.nextInt(1000); int b = r.nextInt(1000); test('Random', ()=> expect(addition(a, b), equals(a+b))); }); }
- // See https://pub.dartlang.org/packages/test
- import "package:test/test.dart";
- import "package:solution/solution.dart";
- import "dart:math";
- void main() {
- group("Tests", () {
- test('1+1=', ()=> expect(addition(1, 1), equals(2)));
- test('2+0=', ()=> expect(addition(2, 0), equals(2)));
- test('123+321=', ()=> expect(addition(123, 321), equals(444)));
- Random r = Random();
- int a = r.nextInt(1000);
- int b = r.nextInt(1000);
- test('Random', ()=> expect(addition(a, b), equals(a+b)));
- });
- }