Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
coreysprague committed Jul 10, 2020
1 parent 897a4d9 commit f65374c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
6 changes: 5 additions & 1 deletion packages/golden_toolkit/lib/src/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ class GoldenToolkitConfiguration {

@override
int get hashCode =>
skipGoldenAssertion.hashCode ^ fileNameFactory.hashCode ^ deviceFileNameFactory.hashCode ^ primeAssets.hashCode ^ defaultDevices.hashCode;
skipGoldenAssertion.hashCode ^
fileNameFactory.hashCode ^
deviceFileNameFactory.hashCode ^
primeAssets.hashCode ^
defaultDevices.hashCode;
}

bool _doNotSkip() => false;
Expand Down
8 changes: 4 additions & 4 deletions packages/golden_toolkit/test/configuration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ void main() {
});

test('defaultDevices should not be null or empty', () async {
await expectLater(() =>
GoldenToolkit.runWithConfiguration(
await expectLater(
() => GoldenToolkit.runWithConfiguration(
() {},
config: GoldenToolkitConfiguration(defaultDevices: null),
),
throwsAssertionError,
);

await expectLater(() =>
GoldenToolkit.runWithConfiguration(
await expectLater(
() => GoldenToolkit.runWithConfiguration(
() {},
config: GoldenToolkitConfiguration(defaultDevices: const []),
),
Expand Down
14 changes: 11 additions & 3 deletions packages/golden_toolkit/test/device_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,17 @@ void main() {
expect(dark.safeArea, equals(Device.iphone11.safeArea));
});

test('toString()', (){
const device = Device(name: 'foo', size: Size(100,200), devicePixelRatio: 1.5, brightness: Brightness.dark, safeArea: EdgeInsets.all(1), textScale: 1.5);
expect(device.toString(), equals('Device: foo, 100.0x200.0 @ 1.5, text: 1.5, Brightness.dark, safe: EdgeInsets.all(1.0)'));
test('toString()', () {
const device = Device(
name: 'foo',
size: Size(100, 200),
devicePixelRatio: 1.5,
brightness: Brightness.dark,
safeArea: EdgeInsets.all(1),
textScale: 1.5,
);
expect(device.toString(),
equals('Device: foo, 100.0x200.0 @ 1.5, text: 1.5, Brightness.dark, safe: EdgeInsets.all(1.0)'));
});
});
}

0 comments on commit f65374c

Please sign in to comment.