Files
sdk/tests/lib/isolate/native_wrapper_message_test.dart
T
Alexander Markov a0f356b1f2 [tests/nnbd] Fix lib/isolate tests for NNBD strong mode
The following tests began passing:
dartk-strong-linux-release-x64:lib/isolate/issue_21398_parent_isolate_test/0 was fixed (RuntimeError -> Pass)
dartk-strong-linux-release-x64:lib/isolate/issue_21398_parent_isolate_test/1 was fixed (RuntimeError -> Pass)
dartk-strong-linux-release-x64:lib/isolate/native_wrapper_message_test/0 was fixed (RuntimeError -> Pass)
dartk-strong-linux-release-x64:lib/isolate/native_wrapper_message_test/1 was fixed (RuntimeError -> Pass)

lib/isolate/stacktrace_message_test didn't start passing, but it now
fails in the same way as it fails on legacy bots.


Change-Id: I8514f9f7e85e27f658ef44c5e167bf3709f3c672
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142401
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-04-03 21:34:27 +00:00

38 lines
955 B
Dart

// Copyright (c) 2018, 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.
// VMOptions=--enable-isolate-groups
// VMOptions=--no-enable-isolate-groups
import 'dart:isolate';
import 'dart:nativewrappers';
import 'package:expect/expect.dart';
import 'package:async_helper/async_helper.dart';
echo(msg) {
var data = msg[0];
var reply = msg[1];
reply.send('echoing ${data(1)}}');
}
class Test extends NativeFieldWrapperClass2 {
Test(this.i, this.j);
int i, j;
}
main() {
var port = new RawReceivePort();
var obj = new Test(1, 2);
var msg = [obj, port.sendPort];
var snd = Isolate.spawn(echo, msg);
asyncStart();
Future<Isolate?>.value(snd).catchError((e) {
Expect.isTrue(e is ArgumentError);
Expect.isTrue("$e".contains("NativeWrapper"));
port.close();
asyncEnd();
});
}