Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Test Fails for restaurant #22

Closed
igorgoncalves opened this issue Mar 18, 2020 · 4 comments
Closed

Test Fails for restaurant #22

igorgoncalves opened this issue Mar 18, 2020 · 4 comments

Comments

@igorgoncalves
Copy link
Contributor

When I run the test/runner.dart, a test fails for restaurant names. Maybe the regex is not working correctly for 'Applebee’s International, Inc.' case.

Tests Log:

00:00 +18 -1: food should be able to generate restaurant [E]

  Expected: match '^([\w\s\'-])+$'
    Actual: 'Applebee’s International, Inc.'
  

  package:test_api/src/frontend/expect.dart 154:30              fail
  package:test_api/src/frontend/expect.dart 148:3               _expect
  package:test_api/src/frontend/expect.dart 60:3                expect
  test/specs/food.dart 9:7                                      main.<fn>.<fn>
  package:test_api/src/backend/declarer.dart 172:27             Declarer.test.<fn>.<fn>.<fn>
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1064:19                                  _CustomZone.registerBinaryCallback
  dart:async-patch/async_patch.dart 82:23                       _asyncErrorWrapperHelper
  package:test_api/src/backend/invoker.dart                     Invoker.waitForOutstandingCallbacks.<fn>
  dart:async/zone.dart 1126:13                                  _rootRun
  dart:async/zone.dart 1023:19                                  _CustomZone.run
  dart:async/zone.dart 1518:10                                  _runZoned
  dart:async/zone.dart 1465:12                                  runZoned
  package:test_api/src/backend/invoker.dart 243:5               Invoker.waitForOutstandingCallbacks
  package:test_api/src/backend/declarer.dart 170:33             Declarer.test.<fn>.<fn>
  dart:async/zone.dart 1126:13                                  _rootRun
  dart:async/zone.dart 1023:19                                  _CustomZone.run
  dart:async/zone.dart 1518:10                                  _runZoned
  dart:async/zone.dart 1465:12                                  runZoned
  package:test_api/src/backend/declarer.dart 169:13             Declarer.test.<fn>
  package:test_api/src/backend/invoker.dart 400:25              Invoker._onRun.<fn>.<fn>.<fn>.<fn>
  dart:async/future.dart 176:37                                 new Future.<fn>
  package:stack_trace/src/stack_zone_specification.dart 209:15  StackZoneSpecification._run
  package:stack_trace/src/stack_zone_specification.dart 119:48  StackZoneSpecification._registerCallback.<fn>
  dart:async/zone.dart 1122:38                                  _rootRun
  dart:async/zone.dart 1023:19                                  _CustomZone.run
  dart:async/zone.dart 925:7                                    _CustomZone.runGuarded
  dart:async/zone.dart 965:23                                   _CustomZone.bindCallbackGuarded.<fn>
  package:stack_trace/src/stack_zone_specification.dart 209:15  StackZoneSpecification._run
  package:stack_trace/src/stack_zone_specification.dart 119:48  StackZoneSpecification._registerCallback.<fn>
  dart:async/zone.dart 1126:13                                  _rootRun
  dart:async/zone.dart 1023:19                                  _CustomZone.run
  dart:async/zone.dart 949:23                                   _CustomZone.bindCallback.<fn>
  dart:async-patch/timer_patch.dart 23:15                       Timer._createTimer.<fn>
  dart:isolate-patch/timer_impl.dart 384:19                     _Timer._runTimers
  dart:isolate-patch/timer_impl.dart 418:5                      _Timer._handleMessage
  dart:isolate-patch/isolate_patch.dart 174:12                  _RawReceivePortImpl._handleMessage
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1047:19                                  _CustomZone.registerCallback
  dart:async/zone.dart 964:22                                   _CustomZone.bindCallbackGuarded
  dart:async/timer.dart 54:45                                   new Timer
  dart:async/timer.dart 91:9                                    Timer.run
  dart:async/future.dart 174:11                                 new Future
  package:test_api/src/backend/invoker.dart 399:21              Invoker._onRun.<fn>.<fn>.<fn>
  dart:async/zone.dart 1126:13                                  _rootRun
  dart:async/zone.dart 1023:19                                  _CustomZone.run
  dart:async/zone.dart 1518:10                                  _runZoned
  dart:async/zone.dart 1465:12                                  runZoned
  package:test_api/src/backend/invoker.dart 387:9               Invoker._onRun.<fn>.<fn>
  package:test_api/src/backend/invoker.dart 438:15              Invoker._guardIfGuarded
  package:test_api/src/backend/invoker.dart 386:7               Invoker._onRun.<fn>
  package:stack_trace/src/chain.dart 101:24                     Chain.capture.<fn>
  dart:async/zone.dart 1126:13                                  _rootRun
  dart:async/zone.dart 1023:19                                  _CustomZone.run
  dart:async/zone.dart 1518:10                                  _runZoned
  dart:async/zone.dart 1465:12                                  runZoned
  package:stack_trace/src/chain.dart 99:12                      Chain.capture
  package:test_api/src/backend/invoker.dart 385:11              Invoker._onRun
  package:test_api/src/backend/live_test_controller.dart 197:5  LiveTestController._run
  package:test_api/src/backend/live_test_controller.dart 50:37  _LiveTest.run
  dart:async/future.dart 202:37                                 new Future.microtask.<fn>
  dart:async/zone.dart 1122:38                                  _rootRun
  dart:async/zone.dart 1023:19                                  _CustomZone.run
  dart:async/zone.dart 925:7                                    _CustomZone.runGuarded
  dart:async/zone.dart 965:23                                   _CustomZone.bindCallbackGuarded.<fn>
  dart:async/zone.dart 1126:13                                  _rootRun
  dart:async/zone.dart 1023:19                                  _CustomZone.run
  dart:async/zone.dart 925:7                                    _CustomZone.runGuarded
  dart:async/zone.dart 965:23                                   _CustomZone.bindCallbackGuarded.<fn>
  dart:async/schedule_microtask.dart 43:21                      _microtaskLoop
  dart:async/schedule_microtask.dart 52:5                       _startMicrotaskLoop
  dart:isolate-patch/timer_impl.dart 393:30                     _Timer._runTimers
  dart:isolate-patch/timer_impl.dart 418:5                      _Timer._handleMessage
  dart:isolate-patch/isolate_patch.dart 174:12                  _RawReceivePortImpl._handleMessage
@igorgoncalves
Copy link
Contributor Author

I found the problem, any case of name who contains a special character (, . ' ` ; ö etc) will fails, can I remove these characters im my PR #21 or open a other?

@igorgoncalves
Copy link
Contributor Author

I just have changed the de regex for add the characters and open a new PR

Before: r"^([\w\s'-])+$"
After: r"^([\w\s&/,.\ö\’'-])+$

This was referenced Mar 18, 2020
@igorgoncalves
Copy link
Contributor Author

@drager hey, can you review that? :D

@drager
Copy link
Owner

drager commented Apr 2, 2020

@igorgoncalves Will do, sorry for the late response!

@drager drager closed this as completed Oct 27, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants