mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
test: remove checks for messages of throws
Platform specific messages for throws is different, so checking that test throws proper type should be enough
This commit is contained in:
parent
8791527ad9
commit
7f0cd86e72
35 changed files with 171 additions and 1331 deletions
|
@ -162,13 +162,7 @@ index e69de29..0000000
|
|||
aPath: 'file',
|
||||
bPath: 'file',
|
||||
),
|
||||
throwsA(
|
||||
isA<ArgumentError>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
"Invalid argument(s): Provided argument(s) is not Blob or String",
|
||||
),
|
||||
),
|
||||
throwsA(isA<ArgumentError>()),
|
||||
);
|
||||
|
||||
expect(
|
||||
|
@ -178,13 +172,7 @@ index e69de29..0000000
|
|||
aPath: 'file',
|
||||
bPath: 'file',
|
||||
),
|
||||
throwsA(
|
||||
isA<ArgumentError>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
"Invalid argument(s): Provided argument(s) is not Blob or String",
|
||||
),
|
||||
),
|
||||
throwsA(isA<ArgumentError>()),
|
||||
);
|
||||
|
||||
commit.free();
|
||||
|
@ -193,26 +181,14 @@ index e69de29..0000000
|
|||
test('throws when trying to create from diff and error occurs', () {
|
||||
expect(
|
||||
() => Patch.fromDiff(diff: Diff(nullptr), index: 0),
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
"invalid argument: 'diff'",
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
});
|
||||
|
||||
test('throws when trying to text of patch and error occurs', () {
|
||||
expect(
|
||||
() => Patch(nullptr, nullptr, nullptr).text,
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
"invalid argument: 'patch'",
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue