test(client): 用例名统一为 should_<期望>_when_<条件>(155/155)
为什么:红线第 8 条门禁立即生效,要求 Flutter 测试命名合规;此前 155 条用例名是英文自然语言 或中文描述,合规数 0/155,属存量欠账,按"先补齐再上新功能"在本批处理。 - 25 个测试文件、155 条用例改名,按「文件 + 旧名」精确定位,每条断言命中恰好 1 次才替换 - 只改名字字面量:改动行 155 删 + 155 增,无一行不含字符串字面量(断言与用例体零改动) - 门禁:dart analyze lib test = No issues found;flutter test = 155 全过
This commit is contained in:
1 parent
1853e1845c
commit
0e5d550b50
25 files changed
+155
-155
No files matched your search
@@ -17,7 +17,7 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
test('warm playback starts before old native disposal finishes', () async {
|
||||
test('should_start_warm_playback_when_old_native_disposal_is_still_running', () async {
|
||||
final release = Completer<void>();
|
||||
final factory = _Factory(disposeGates: {'ep-0': release});
|
||||
final session = PlaybackSession(
|
||||
@@ -41,7 +41,7 @@ void main() {
|
||||
await session.close();
|
||||
});
|
||||
|
||||
test('failed native release blocks another route from allocating', () async {
|
||||
test('should_block_another_route_from_allocating_when_native_release_fails', () async {
|
||||
final factory = _Factory(disposeFailures: {'ep-0'});
|
||||
final coordinator = PlaybackCoordinator();
|
||||
PlaybackSession createSession() => PlaybackSession(
|
||||
@@ -68,7 +68,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'next is prepared silently and promoted without another initialize',
|
||||
'should_prepare_next_silently_and_promote_it_when_swiped',
|
||||
() async {
|
||||
final factory = _Factory();
|
||||
final prepared = <String>[];
|
||||
@@ -103,7 +103,7 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
test('in-flight preload is reused when swiped before ready', () async {
|
||||
test('should_reuse_in_flight_preload_when_swiped_before_ready', () async {
|
||||
final gate = Completer<void>();
|
||||
final factory = _Factory(gates: {'ep-1': gate});
|
||||
final session = PlaybackSession(
|
||||
@@ -127,7 +127,7 @@ void main() {
|
||||
await session.close();
|
||||
});
|
||||
|
||||
test('rapid reverse and skipped selection discard stale warm work', () async {
|
||||
test('should_discard_stale_warm_work_when_reversing_rapidly_or_skipping_selection', () async {
|
||||
final gate = Completer<void>();
|
||||
final factory = _Factory(gates: {'ep-1': gate});
|
||||
final session = PlaybackSession(
|
||||
@@ -153,7 +153,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'category adjacency and locked next never preload the wrong episode',
|
||||
'should_never_preload_wrong_episode_when_next_is_locked_or_category_based',
|
||||
() async {
|
||||
final factory = _Factory();
|
||||
final session = PlaybackSession(
|
||||
@@ -172,7 +172,7 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
test('preload failure is isolated and selecting it retries once', () async {
|
||||
test('should_isolate_preload_failure_and_retry_once_when_selected', () async {
|
||||
final factory = _Factory(failOnce: {'ep-1'});
|
||||
final session = PlaybackSession(
|
||||
episodes: episodes,
|
||||
@@ -190,7 +190,7 @@ void main() {
|
||||
await session.close();
|
||||
});
|
||||
|
||||
test('completion in background never starts either player', () async {
|
||||
test('should_start_no_player_when_completion_happens_in_background', () async {
|
||||
final gate = Completer<void>();
|
||||
final factory = _Factory(gates: {'ep-1': gate});
|
||||
final session = PlaybackSession(
|
||||
@@ -215,7 +215,7 @@ void main() {
|
||||
await session.close();
|
||||
});
|
||||
|
||||
test('closing during preloading disposes pending resources', () async {
|
||||
test('should_dispose_pending_resources_when_closing_during_preload', () async {
|
||||
final gate = Completer<void>();
|
||||
final factory = _Factory(gates: {'ep-1': gate});
|
||||
final session = PlaybackSession(
|
||||
@@ -233,7 +233,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'home and series share a two-player budget across route handoff',
|
||||
'should_share_two_player_budget_when_handing_off_between_home_and_series',
|
||||
() async {
|
||||
final factory = _Factory();
|
||||
final coordinator = PlaybackCoordinator();
|
||||
|
||||
Reference in new issue
Block a user