Add some test cases to function_type_bounds_test.dart.

Change-Id: Iba7bb2b1e2a1f63a228154be2a9ce23d46da54cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341382
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
diff --git a/tests/language/nnbd/subtyping/function_type_bounds_test.dart b/tests/language/nnbd/subtyping/function_type_bounds_test.dart
index 32be442..55dbc26 100644
--- a/tests/language/nnbd/subtyping/function_type_bounds_test.dart
+++ b/tests/language/nnbd/subtyping/function_type_bounds_test.dart
@@ -12,4 +12,18 @@
 
   // void fn<T extends int>() is void Function<T extends int>()
   Expect.isTrue(fnWithNonNullIntBound is fnTypeWithNonNullIntBound);
+
+  // void fn<T extends Object?>() is void Function<T extends Object?>()
+  Expect.isTrue(fnWithNullableObjectBound is fnTypeWithNullableObjectBound);
+  // void fn<T extends int?>() is void Function<T extends int?>()
+  Expect.isTrue(fnWithNullableIntBound is fnTypeWithNullableIntBound);
+
+  // void fn<T extends Object?>() is! void Function<T extends Object>()
+  // (except when using unsound null safety)
+  Expect.equals(hasUnsoundNullSafety,
+      fnWithNullableObjectBound is fnTypeWithNonNullObjectBound);
+  // void fn<T extends Object>() is! void Function<T extends Object?>()
+  // (except when using unsound null safety)
+  Expect.equals(hasUnsoundNullSafety,
+      fnWithNonNullObjectBound is fnTypeWithNullableObjectBound);
 }