dart-sdk/tests/macro_build/ddc_lt_test.dart
David Morgan 6f7f571989 [macros] Fix basic macro compile with DDC, add e2e test.
The e2e test is for "how DDC is used in the language tests", more
realistic setupts to follow.

R=jakemac@google.com, nshahan@google.com

Change-Id: Iece44740d2e4d91748a7deef59f4e18ad42ac853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356241
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-03-08 11:37:46 +00:00

29 lines
1.1 KiB
Dart

// Copyright (c) 2024, 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 'tester/tester.dart';
void main() {
testMacroBuild([
r'$DART pub get',
r'$DART '
r'$DART_SDK_OUT/dart-sdk/bin/snapshots/dartdevc.dart.snapshot '
'-Dtest_runner.configuration=ddc-linux-chrome '
'--enable-experiment=macros '
'--sound-null-safety '
'-Dtest_runner.configuration=ddc-linux-chrome '
'--ignore-unrecognized-flags '
'--no-summarize '
'-o out.js '
'test/main.dart '
r'-s $DART_SDK_OUT/gen/utils/ddc/async_helper_outline.dill=async_helper '
r'-s $DART_SDK_OUT/gen/utils/ddc/expect_outline.dill=expect '
r'-s $DART_SDK_OUT/gen/utils/ddc/js_outline.dill=js '
r'-s $DART_SDK_OUT/gen/utils/ddc/meta_outline.dill=meta',
// Running out.js is nontrivial, just check if it contains the getter
// that the macro is supposed to add.
r'grep -q return$SPACE"OK" out.js',
]);
}