// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.// @dart=2.9// Running in unsound null-safety mode is intended to test for potential miscasts// or invalid assertions.import'package:flutter/src/foundation/_isolates_io.dart';import'package:flutter/src/foundation/isolates.dart'asisolates;intreturnInt(intarg){returnarg;}Future<int>returnIntAsync(intarg){returnFuture<int>.value(arg);}Future<void>testCompute<T>(isolates.ComputeCallback<T,T>callback,Tinput)async{if(input!=awaitcompute(callback,input)){throwException('compute returned bad result');}}voidmain()async{awaittestCompute(returnInt,10);awaittestCompute(returnInt,null);awaittestCompute(returnIntAsync,10);awaittestCompute(returnIntAsync,null);}