diff --git a/test/core/context_test.dart b/test/core/context_test.dart index 205f9ea0..b4fecdac 100644 --- a/test/core/context_test.dart +++ b/test/core/context_test.dart @@ -45,5 +45,17 @@ void main() { throwsA(isA()), ); }); + + test("correctly override the hashCode getter", () { + const string1 = "foobar"; + const string2 = "foobar"; + + final singleContextValue1 = SingleContextEntry.fromString(string1); + final singleContextValue2 = SingleContextEntry.fromString(string2); + + expect(string1.hashCode, string2.hashCode); + + expect(singleContextValue1.hashCode, singleContextValue2.hashCode); + }); }); }