Skip to content

Commit

Permalink
clean up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitri Svetlanov authored and Dmitri Svetlanov committed Nov 23, 2023
1 parent b14a731 commit 77fd6bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 28 deletions.
10 changes: 0 additions & 10 deletions test/easy_localization_language_specific_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ import 'package:shared_preferences/shared_preferences.dart';

import 'utils/test_asset_loaders.dart';

var printLog = [];

dynamic overridePrint(Function() testFn) => () {
var spec = ZoneSpecification(print: (_, __, ___, String msg) {
// Add to log instead of printing to stdout
printLog.add(msg);
});
return Zone.current.fork(specification: spec).run(testFn);
};

void main() {
group('language-specific-plurals', () {
var r = EasyLocalizationController(
Expand Down
10 changes: 2 additions & 8 deletions test/easy_localization_logger_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:easy_logger/easy_logger.dart';
import 'package:flutter_test/flutter_test.dart';

List<String> printLog = [];
dynamic overridePrint(Function() testFn) => () {
var spec = ZoneSpecification(print: (_, __, ___, String msg) {
// Add to log instead of printing to stdout
printLog.add(msg);
});
return Zone.current.fork(specification: spec).run(testFn);
};
import 'easy_localization_test.dart';
import 'easy_localization_utils_test.dart';

void main() async {
group('Logger testing', () {
Expand Down
11 changes: 1 addition & 10 deletions test/easy_localization_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:shared_preferences/shared_preferences.dart';

import 'easy_localization_utils_test.dart';
import 'utils/test_asset_loaders.dart';

var printLog = [];

dynamic overridePrint(Function() testFn) => () {
var spec = ZoneSpecification(print: (_, __, ___, String msg) {
// Add to log instead of printing to stdout
printLog.add(msg);
});
return Zone.current.fork(specification: spec).run(testFn);
};

void main() {
group('localization', () {
var r1 = EasyLocalizationController(
Expand Down

0 comments on commit 77fd6bf

Please sign in to comment.