Skip to content

Commit 28f9754

Browse files
authored
Organize test files (#190)
1 parent 83e7b7b commit 28f9754

21 files changed

+18
-21
lines changed

json_serializable/test/kitchen_sink_test.dart renamed to json_serializable/test/kitchen_sink/kitchen_sink_test.dart

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,16 @@ import 'package:json_annotation/json_annotation.dart';
88
import 'package:json_serializable/src/constants.dart';
99
import 'package:yaml/yaml.dart';
1010

11-
import 'kitchen_sink_test_files/kitchen_sink.dart' as nullable
11+
import '../test_utils.dart';
12+
import 'kitchen_sink.dart' as nullable show testFactory, testFromJson;
13+
import 'kitchen_sink.non_nullable.checked.dart' as checked
1214
show testFactory, testFromJson;
13-
import 'kitchen_sink_test_files/kitchen_sink.non_nullable.checked.dart'
14-
as checked show testFactory, testFromJson;
15-
import 'kitchen_sink_test_files/kitchen_sink.non_nullable.dart' as nn
16-
show testFactory, testFromJson;
17-
import 'kitchen_sink_test_files/kitchen_sink.non_nullable.wrapped.dart'
18-
as nnwrapped show testFactory, testFromJson;
19-
import 'kitchen_sink_test_files/kitchen_sink.wrapped.dart' as wrapped
15+
import 'kitchen_sink.non_nullable.dart' as nn show testFactory, testFromJson;
16+
import 'kitchen_sink.non_nullable.wrapped.dart' as nnwrapped
2017
show testFactory, testFromJson;
18+
import 'kitchen_sink.wrapped.dart' as wrapped show testFactory, testFromJson;
2119

22-
import 'kitchen_sink_test_files/kitchen_sink_interface.dart';
23-
import 'test_utils.dart';
20+
import 'kitchen_sink_interface.dart';
2421

2522
final _isATypeError = const isInstanceOf<TypeError>();
2623

json_serializable/test/yaml_test_files/yaml_test.dart renamed to json_serializable/test/yaml/yaml_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'package:yaml/yaml.dart';
1212
import '../test_utils.dart';
1313
import 'build_config.dart';
1414

15-
final _root = p.join('test', 'yaml_test_files');
15+
final _root = p.join('test', 'yaml');
1616

1717
List<String> _getTests() => new Directory(_root)
1818
.listSync()

json_serializable/tool/build.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ final List<BuilderApplication> builders = [
3737
applyToRoot(nonNull(),
3838
generateFor: const InputSet(include: const [
3939
'test/default_value/default_value.dart',
40-
'test/kitchen_sink_test_files/kitchen_sink.dart',
40+
'test/kitchen_sink/kitchen_sink.dart',
4141
'test/test_files/json_test_example.dart'
4242
])),
4343
applyToRoot(checked(),
4444
generateFor: const InputSet(include: const [
45-
'test/kitchen_sink_test_files/kitchen_sink.non_nullable.dart',
45+
'test/kitchen_sink/kitchen_sink.non_nullable.dart',
4646
])),
4747
applyToRoot(wrapped(),
4848
generateFor: const InputSet(include: const [
4949
'test/generic_files/generic_class.dart',
50-
'test/kitchen_sink_test_files/kitchen_sink.dart',
51-
'test/kitchen_sink_test_files/kitchen_sink.non_nullable.dart',
50+
'test/kitchen_sink/kitchen_sink.dart',
51+
'test/kitchen_sink/kitchen_sink.non_nullable.dart',
5252
'test/test_files/json_test_example.dart',
5353
'test/test_files/json_test_example.non_nullable.dart',
5454
])),
@@ -67,16 +67,16 @@ final List<BuilderApplication> builders = [
6767
applyToRoot(_jsonPartBuilder(anyMap: true),
6868
generateFor: const InputSet(
6969
include: const [
70-
'test/kitchen_sink_test_files/kitchen_sink.dart',
71-
'test/kitchen_sink_test_files/kitchen_sink.non_nullable.dart',
72-
'test/kitchen_sink_test_files/simple_object.dart'
70+
'test/kitchen_sink/kitchen_sink.dart',
71+
'test/kitchen_sink/kitchen_sink.non_nullable.dart',
72+
'test/kitchen_sink/simple_object.dart'
7373
],
7474
)),
7575
applyToRoot(_jsonPartBuilder(checked: true, anyMap: true),
7676
generateFor: const InputSet(
7777
include: const [
78-
'test/yaml_test_files/build_config.dart',
79-
'test/kitchen_sink_test_files/kitchen_sink.non_nullable.checked.dart'
78+
'test/yaml/build_config.dart',
79+
'test/kitchen_sink/kitchen_sink.non_nullable.checked.dart'
8080
],
8181
)),
8282
applyToRoot(_jsonPartBuilder(useWrappers: true),
@@ -89,7 +89,7 @@ final List<BuilderApplication> builders = [
8989
applyToRoot(_jsonPartBuilder(useWrappers: true, anyMap: true),
9090
generateFor: const InputSet(
9191
include: const [
92-
'test/kitchen_sink_test_files/kitchen_sink*wrapped.dart',
92+
'test/kitchen_sink/kitchen_sink*wrapped.dart',
9393
],
9494
)),
9595
applyToRoot(testBootstrapBuilder(null),

0 commit comments

Comments
 (0)