[dartdevc] add regression test for consts in outlines

Fixes https://github.com/dart-lang/sdk/issues/37161

Change-Id: I1718628fe92776dd5bc9f1ce51404e67ba7a70d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106483
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
diff --git a/tests/modular/constants_2018/def.dart b/tests/modular/constants_2018/def.dart
new file mode 100644
index 0000000..55e9f4d
--- /dev/null
+++ b/tests/modular/constants_2018/def.dart
@@ -0,0 +1,11 @@
+// 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.
+
+const val = 5;
+const set1 = {if (val % 2 == 1) 0, if (val % 2 == 0) 1};
+const set2 = {
+  1,
+  ...[2, 3],
+  4
+};
diff --git a/tests/modular/constants_2018/main.dart b/tests/modular/constants_2018/main.dart
new file mode 100644
index 0000000..d10c331
--- /dev/null
+++ b/tests/modular/constants_2018/main.dart
@@ -0,0 +1,13 @@
+// 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.
+import 'package:expect/expect.dart';
+
+import 'def.dart';
+
+const set3 = [...set1, ...set2];
+
+main() {
+  Expect.isTrue(set3.length == 5);
+  Expect.setEquals(set3, {0, 1, 2, 3, 4});
+}
diff --git a/tests/modular/constants_2018/modules.yaml b/tests/modular/constants_2018/modules.yaml
new file mode 100644
index 0000000..e5a6190
--- /dev/null
+++ b/tests/modular/constants_2018/modules.yaml
@@ -0,0 +1,10 @@
+# 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.
+#
+# Regression test: integral numbers should be treated as int and not double
+# after serialization across modules.
+dependencies:
+  main: [def, expect]
+flags:
+  - constant-update-2018