Skip to content

Commit

Permalink
Update goldens
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Feb 10, 2024
1 parent 763f9a5 commit 85908d5
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,20 @@ Diff for file `test/assists/convert_class_based_provider_to_functional/convert_c
+ // Hello world
+ return 0;
+ }

@riverpod
```
---
Message: `Convert to functional provider`
Priority: 100
Diff for file `test/assists/convert_class_based_provider_to_functional/convert_class_based_provider_to_functional.dart:23`:
```

@riverpod
- class Generic<A, /* comment */ B> extends _$Generic<A, B> {
- @override
- int build() => 0;
- }
+ int generic<A, /* comment */ B>(GenericRef<A, /* comment */ B> ref) => 0;
```
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Message: `Type as NamelessRef`
Priority: 90
Diff for file `test/lints/functional_ref/functional_ref.dart:8`:
```
int nameless(
// expect_lint: functional_ref
- ref,
+ NamelessRef ref,
) {
return 0;
```
---
Message: `Type as NoGenericsRef<A, B>`
Priority: 90
Diff for file `test/lints/functional_ref/functional_ref.dart:21`:
```
@riverpod
// expect_lint: functional_ref
- int noGenerics<A extends num, B>(NoGenericsRef ref) => 0;
+ int noGenerics<A extends num, B>(NoGenericsRef<A, B> ref) => 0;

@riverpod
```
---
Message: `Type as MissingGenericsRef<A, B>`
Priority: 90
Diff for file `test/lints/functional_ref/functional_ref.dart:25`:
```
@riverpod
// expect_lint: functional_ref
- int missingGenerics<A, B>(MissingGenericsRef ref) => 0;
+ int missingGenerics<A, B>(MissingGenericsRef<A, B> ref) => 0;

@riverpod
```
---
Message: `Type as WrongOrderRef<B, A>`
Priority: 90
Diff for file `test/lints/functional_ref/functional_ref.dart:29`:
```
@riverpod
// expect_lint: functional_ref
- int wrongOrder<B, A>(WrongOrderRef ref) => 0;
+ int wrongOrder<B, A>(WrongOrderRef<B, A> ref) => 0;
```
---

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import '../../golden.dart';
void main() {
testGolden(
'Verify that @riverpod classes extend the generated typedef',
'lints/functional_ref/functional_ref.json',
'lints/functional_ref/functional_ref.diff',
sourcePath: 'test/lints/functional_ref/functional_ref.dart',
(result) async {
final lint = FunctionalRef();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Message: `Extend _$NoExtends`
Priority: 90
Diff for file `test/lints/notifier_extends/notifier_extends.dart:12`:
Diff for file `test/lints/notifier_extends/notifier_extends.dart:14`:
```
@riverpod
// expect_lint: notifier_extends
Expand All @@ -12,7 +12,7 @@ Diff for file `test/lints/notifier_extends/notifier_extends.dart:12`:
---
Message: `Extend _$WrongExtends`
Priority: 90
Diff for file `test/lints/notifier_extends/notifier_extends.dart:18`:
Diff for file `test/lints/notifier_extends/notifier_extends.dart:20`:
```
@riverpod
// expect_lint: notifier_extends
Expand All @@ -22,3 +22,39 @@ Diff for file `test/lints/notifier_extends/notifier_extends.dart:18`:
}
```
---
Message: `Extend _$NoGenerics<A, B>`
Priority: 90
Diff for file `test/lints/notifier_extends/notifier_extends.dart:38`:
```
@riverpod
// expect_lint: notifier_extends
- class NoGenerics<A extends num, B> extends _$NoGenerics {
+ class NoGenerics<A extends num, B> extends _$NoGenerics<A, B> {
int build() => 0;
}
```
---
Message: `Extend _$MissingGenerics<A, B>`
Priority: 90
Diff for file `test/lints/notifier_extends/notifier_extends.dart:44`:
```
@riverpod
// expect_lint: notifier_extends
- class MissingGenerics<A, B> extends _$MissingGenerics<A> {
+ class MissingGenerics<A, B> extends _$MissingGenerics<A, B> {
int build() => 0;
}
```
---
Message: `Extend _$WrongOrder<A, B>`
Priority: 90
Diff for file `test/lints/notifier_extends/notifier_extends.dart:50`:
```
@riverpod
// expect_lint: notifier_extends
- class WrongOrder<A, B> extends _$WrongOrder<B, A> {
+ class WrongOrder<A, B> extends _$WrongOrder<A, B> {
int build() => 0;
}
```
---

0 comments on commit 85908d5

Please sign in to comment.