Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- apache gzip
- android fragment
- Android Apk 이름 변경
- Java
- Android
- release Apk
- CSS사용법
- DataTable
- JavaScript
- java error
- MySQL
- html
- css
- Eclipse
- Android Apk
- Exception
- Android Apk 이름
- 안드로이드
- R프로그래밍
- FLUTTER
- Program type already present
- Firebase
- fragment
- Kotlin
- spring
- error
- android error
- jQuery
- release unsigned
- tomcat
Archives
- Today
- Total
selfstarter
Flutter Test Code 작성 본문
flutter-ko.dev/docs/cookbook/testing/unit/introduction
1. pubspec.yaml 추가
dev_dependencies:
test: ^1.5.1
2. lib/counter.dart 추가
class Counter {
int value = 0;
void increment() => value++;
void decrement() => value--;
}
3. counter_test.dart 추가
// test 패키지와 Counter 클래스를 import합니다.
import 'package:test/test.dart';
import 'package:welcome/counter.dart';
void main() {
test('Counter value should be incremented', () {
final counter = Counter();
counter.increment();
expect(counter.value, 1);
});
}
'App > Flutter' 카테고리의 다른 글
info - Only use double quotes for strings containing single quotes - (0) | 2020.09.04 |
---|---|
chocolatey 설치 하기 (0) | 2020.08.27 |
Android Flutter SDK 경로 설정 (0) | 2020.08.23 |
Could not find a command named "bin\main.dart". (0) | 2020.08.21 |
Your launch config references a program that does not exist (0) | 2020.08.09 |
Comments