Issue #465: tests for Generics in NNBD added.
diff --git a/LanguageFeatures/nnbd/generics_A01_t01.dart b/LanguageFeatures/nnbd/generics_A01_t01.dart
new file mode 100644
index 0000000..5d5f59c
--- /dev/null
+++ b/LanguageFeatures/nnbd/generics_A01_t01.dart
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion The default bound of generic type parameters is treated as
+ * [Object?].
+ * @description Check that default class type parameter is treated as [Object?]
+ * dynamically.
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+import "../../Utils/expect.dart";
+
+class A<T> {}
+
+class B<T1, T2, T3> {}
+
+main() {
+ Expect.equals(
+ typeOf<A<Object?>>(),
+ typeOf<A>()
+ );
+
+ Expect.equals(
+ typeOf<B<Object?, Object?, Object?>>(),
+ typeOf<B>()
+ );
+
+}
diff --git a/LanguageFeatures/nnbd/generics_A01_t02.dart b/LanguageFeatures/nnbd/generics_A01_t02.dart
new file mode 100644
index 0000000..eb1bcfd
--- /dev/null
+++ b/LanguageFeatures/nnbd/generics_A01_t02.dart
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion The default bound of generic type parameters is treated as
+ * [Object?].
+ * @description Check that default class type parameter is treated as [Object?]
+ * statically.
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+import "../../Utils/expect.dart";
+
+class A<T> {}
+
+class B<T1, T2, T3> {}
+
+main() {
+ A? source;
+ var fsource = toF(source);
+ F<A<dynamic>> target = fsource;
+
+ B? sourceB;
+ var fsourceB = toF(sourceB);
+ F<B<dynamic, dynamic, dynamic>> targetB = fsourceB;
+}
diff --git a/LanguageFeatures/nnbd/generics_A01_t03.dart b/LanguageFeatures/nnbd/generics_A01_t03.dart
new file mode 100644
index 0000000..f7c5110
--- /dev/null
+++ b/LanguageFeatures/nnbd/generics_A01_t03.dart
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion The default bound of generic type parameters is treated as
+ * [Object?].
+ * @description Check that default non-function typedef type parameter is
+ * treated as [Object?] dynamically.
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+
+import "../../Utils/expect.dart";
+
+class A<T> {}
+typedef AAlias<T> = A<T>
+
+class B<T1, T2, T3> {}
+typedef BAlias<T1, T2, T3> = B<T1, T2, T3>
+
+main() {
+ Expect.equals(
+ typeOf<AAlias<Object?>>(),
+ typeOf<AAlias>()
+ );
+
+ Expect.equals(
+ typeOf<BAlias<Object?, Object?, Object?>>(),
+ typeOf<BAlias>()
+ );
+}
\ No newline at end of file
diff --git a/LanguageFeatures/nnbd/generics_A01_t04.dart b/LanguageFeatures/nnbd/generics_A01_t04.dart
new file mode 100644
index 0000000..063937e
--- /dev/null
+++ b/LanguageFeatures/nnbd/generics_A01_t04.dart
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion The default bound of generic type parameters is treated as
+ * [Object?].
+ * @description Check that default non-function typedef type parameter is
+ * treated as [Object?] statically.
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+
+import "../../Utils/expect.dart";
+
+class A<T> {}
+typedef AAlias<T> = A<T>
+
+class B<T1, T2, T3> {}
+typedef BAlias<T1, T2, T3> = B<T1, T2, T3>
+
+main() {
+ AAlias? source;
+ var fsource = toF(source);
+ F<AAlias<dynamic>> target = fsource;
+
+ BAlias? sourceB;
+ var fsourceB = toF(sourceB);
+ F<BAlias<dynamic, dynamic, dynamic>> targetB = fsourceB;
+}