You can use isNot()
to negate the equals()
matcher.
final x = 1;
final y = 2;
expect(x, isNot(equals(y)));
Or as mentioned in the comments:
expect(x != y, true)
That actually seems a bit more readable to me.
You can use isNot()
to negate the equals()
matcher.
final x = 1;
final y = 2;
expect(x, isNot(equals(y)));
Or as mentioned in the comments:
expect(x != y, true)
That actually seems a bit more readable to me.