blob: 3f5b19190c46dbc9b1d9b5b604fea9958f41fde4 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(https://fxbug.dev/42165807): Fix null safety and remove this language version.
// @dart=2.9
import 'package:sl4f/sl4f.dart' as sl4f;
import 'package:test/test.dart';
const _timeout = Timeout(Duration(minutes: 1));
void main() {
sl4f.Sl4f sl4fDriver;
sl4f.DeviceLog logging;
setUp(() async {
sl4fDriver = sl4f.Sl4f.fromEnvironment();
await sl4fDriver.startServer();
logging = sl4f.DeviceLog(sl4fDriver);
});
tearDown(() async {
await sl4fDriver.stopServer();
sl4fDriver.close();
});
group(sl4f.DeviceLog, () {
test('talks to SL4F server without error', () async {
// If anything throws an exception then we've failed.
await logging.info('info level test');
await logging.warn('warn level test');
await logging.error('error level test');
});
}, timeout: _timeout);
}