From 0c022c2af3ad9db81142004a7f2e2afb5df8faf1 Mon Sep 17 00:00:00 2001 From: Seungsoo Lee Date: Thu, 25 Jun 2026 17:32:31 +0900 Subject: [PATCH 1/3] [tizen_log] Add regression integration tests Add 8 Tizen regression test cases for the public Log API: - Log.verbose does not throw - Log.debug does not throw - Log.info does not throw - Log.warn does not throw - Log.error does not throw - Log.fatal does not throw - Log.isDebugEnabled is false by default - Log with optional file, func, and line parameters does not throw Co-Authored-By: Claude Sonnet 4.6 --- packages/tizen_log/CHANGELOG.md | 1 + .../integration_test/tizen_log_test.dart | 57 +++++++++++++++++++ packages/tizen_log/example/pubspec.yaml | 10 ++++ .../example/test_driver/integration_test.dart | 7 +++ 4 files changed, 75 insertions(+) create mode 100644 packages/tizen_log/example/integration_test/tizen_log_test.dart create mode 100644 packages/tizen_log/example/test_driver/integration_test.dart diff --git a/packages/tizen_log/CHANGELOG.md b/packages/tizen_log/CHANGELOG.md index 7a44d6df5..28b6c9f88 100644 --- a/packages/tizen_log/CHANGELOG.md +++ b/packages/tizen_log/CHANGELOG.md @@ -1,5 +1,6 @@ ## NEXT +* Add regression integration tests. * Update minimum Flutter and Dart version to 3.13 and 3.1. * Fix new lint warnings. * Update code format. diff --git a/packages/tizen_log/example/integration_test/tizen_log_test.dart b/packages/tizen_log/example/integration_test/tizen_log_test.dart new file mode 100644 index 000000000..2059fc458 --- /dev/null +++ b/packages/tizen_log/example/integration_test/tizen_log_test.dart @@ -0,0 +1,57 @@ +// Copyright 2026 Samsung Electronics Co., Ltd. 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:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:tizen_log/tizen_log.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + const String tag = 'TizenLogTest'; + + group('Log', () { + testWidgets('verbose does not throw', (tester) async { + expect(() => Log.verbose(tag, 'verbose message'), returnsNormally); + }); + + testWidgets('debug does not throw', (tester) async { + expect(() => Log.debug(tag, 'debug message'), returnsNormally); + }); + + testWidgets('info does not throw', (tester) async { + expect(() => Log.info(tag, 'info message'), returnsNormally); + }); + + testWidgets('warn does not throw', (tester) async { + expect(() => Log.warn(tag, 'warn message'), returnsNormally); + }); + + testWidgets('error does not throw', (tester) async { + expect(() => Log.error(tag, 'error message'), returnsNormally); + }); + + testWidgets('fatal does not throw', (tester) async { + expect(() => Log.fatal(tag, 'fatal message'), returnsNormally); + }); + + testWidgets('isDebugEnabled is false by default', (tester) async { + expect(Log.isDebugEnabled, isFalse); + }); + + testWidgets('log with optional file, func, and line does not throw', + (tester) async { + expect( + () => Log.info( + tag, + 'message with metadata', + file: 'test.dart', + func: 'main', + line: 1, + ), + returnsNormally, + ); + }); + }); +} diff --git a/packages/tizen_log/example/pubspec.yaml b/packages/tizen_log/example/pubspec.yaml index 318b1d3d4..f2aceed65 100644 --- a/packages/tizen_log/example/pubspec.yaml +++ b/packages/tizen_log/example/pubspec.yaml @@ -12,5 +12,15 @@ dependencies: tizen_log: path: ../ +dev_dependencies: + flutter_driver: + sdk: flutter + flutter_test: + sdk: flutter + integration_test: + sdk: flutter + integration_test_tizen: + path: ../../integration_test/ + flutter: uses-material-design: true diff --git a/packages/tizen_log/example/test_driver/integration_test.dart b/packages/tizen_log/example/test_driver/integration_test.dart new file mode 100644 index 000000000..4f10f2a52 --- /dev/null +++ b/packages/tizen_log/example/test_driver/integration_test.dart @@ -0,0 +1,7 @@ +// Copyright 2013 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. + +import 'package:integration_test/integration_test_driver.dart'; + +Future main() => integrationDriver(); From 52b7598a3218cafc8bc16cc880f9b31ac4decb02 Mon Sep 17 00:00:00 2001 From: Seungsoo Lee Date: Thu, 25 Jun 2026 17:50:14 +0900 Subject: [PATCH 2/3] [tizen_log] Fix missing WidgetTester type annotations in tests Co-Authored-By: Claude Sonnet 4.6 --- .../example/integration_test/tizen_log_test.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/tizen_log/example/integration_test/tizen_log_test.dart b/packages/tizen_log/example/integration_test/tizen_log_test.dart index 2059fc458..2bfa52973 100644 --- a/packages/tizen_log/example/integration_test/tizen_log_test.dart +++ b/packages/tizen_log/example/integration_test/tizen_log_test.dart @@ -12,36 +12,36 @@ void main() { const String tag = 'TizenLogTest'; group('Log', () { - testWidgets('verbose does not throw', (tester) async { + testWidgets('verbose does not throw', (WidgetTester tester) async { expect(() => Log.verbose(tag, 'verbose message'), returnsNormally); }); - testWidgets('debug does not throw', (tester) async { + testWidgets('debug does not throw', (WidgetTester tester) async { expect(() => Log.debug(tag, 'debug message'), returnsNormally); }); - testWidgets('info does not throw', (tester) async { + testWidgets('info does not throw', (WidgetTester tester) async { expect(() => Log.info(tag, 'info message'), returnsNormally); }); - testWidgets('warn does not throw', (tester) async { + testWidgets('warn does not throw', (WidgetTester tester) async { expect(() => Log.warn(tag, 'warn message'), returnsNormally); }); - testWidgets('error does not throw', (tester) async { + testWidgets('error does not throw', (WidgetTester tester) async { expect(() => Log.error(tag, 'error message'), returnsNormally); }); - testWidgets('fatal does not throw', (tester) async { + testWidgets('fatal does not throw', (WidgetTester tester) async { expect(() => Log.fatal(tag, 'fatal message'), returnsNormally); }); - testWidgets('isDebugEnabled is false by default', (tester) async { + testWidgets('isDebugEnabled is false by default', (WidgetTester tester) async { expect(Log.isDebugEnabled, isFalse); }); testWidgets('log with optional file, func, and line does not throw', - (tester) async { + (WidgetTester tester) async { expect( () => Log.info( tag, From 18f0ba7f38d848e2833c68b13f62f1cd8afe6660 Mon Sep 17 00:00:00 2001 From: Seungsoo Lee Date: Thu, 9 Jul 2026 10:32:05 +0900 Subject: [PATCH 3/3] [tizen_log] Fix dart format drift --- .../tizen_log/example/integration_test/tizen_log_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/tizen_log/example/integration_test/tizen_log_test.dart b/packages/tizen_log/example/integration_test/tizen_log_test.dart index 2bfa52973..7e3dec517 100644 --- a/packages/tizen_log/example/integration_test/tizen_log_test.dart +++ b/packages/tizen_log/example/integration_test/tizen_log_test.dart @@ -36,7 +36,8 @@ void main() { expect(() => Log.fatal(tag, 'fatal message'), returnsNormally); }); - testWidgets('isDebugEnabled is false by default', (WidgetTester tester) async { + testWidgets('isDebugEnabled is false by default', + (WidgetTester tester) async { expect(Log.isDebugEnabled, isFalse); });