fixing a ton of sloppy mess...

This commit is contained in:
Wowieee4
2026-05-17 18:40:03 +07:00
parent f970f1bac8
commit d2608e0188
37 changed files with 3099 additions and 1795 deletions
@@ -1,5 +1,6 @@
// test/unit/obstacle_analyzer_test.dart
//
// test/unit/obstacle_analyzer_test.dart
// ignore_for_file: prefer_const_declarations
//
// Unit test untuk ObstacleAnalyzer — logika AI direction & distance.
// Jalankan: flutter test test/unit/obstacle_analyzer_test.dart
//
@@ -51,14 +51,14 @@ class _FakeStt {
// VoiceCommandHandler (mirror dari project)
typedef CommandCallback = void Function(VoiceCommandKey key);
class VoiceCommandHandler {
class _VoiceCommandHandler {
final _FakeStt _stt;
final _FakeTts _tts;
List<VoiceCommand> _commands = [];
CommandCallback? onCommand;
VoiceCommandHandler(this._stt, this._tts);
_VoiceCommandHandler(this._stt, this._tts);
void loadCommands(List<VoiceCommand> commands) {
_commands = commands;
@@ -137,7 +137,7 @@ class VoiceCommandHandler {
// ---------- Tests ----------
void main() {
late VoiceCommandHandler handler;
late _VoiceCommandHandler handler;
late _FakeStt fakeStt;
late _FakeTts fakeTts;
@@ -146,7 +146,7 @@ void main() {
setUp(() {
fakeStt = _FakeStt();
fakeTts = _FakeTts();
handler = VoiceCommandHandler(fakeStt, fakeTts);
handler = _VoiceCommandHandler(fakeStt, fakeTts);
dispatchedCommands.clear();
handler.loadDefaultCommands();
handler.onCommand = dispatchedCommands.add;