Testing in Dart
Testing is an important part of software development, and Dart provides a built-in testing framework called test. This framework allows you to write tests for your code and run them automatically.
import 'package:test/test.dart';
int add(int a, int b) {
return a + b;
}
void main() {
test('add', () {
expect(add(2, 3), equals(5));
});
}
No comments:
Post a Comment