Skip to content

Commit

Permalink
fix(parameter): Updated float parameter parser so an exception is not…
Browse files Browse the repository at this point in the history
… thrown during parsing
  • Loading branch information
jonsamwell committed Jun 1, 2021
1 parent 10ec39e commit d83ddd6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
## [2.0.3] - 01/06/2021

* Updated float parameter parser so an exception is not thrown during parsing

## [2.0.2] - 25/05/2021

* Fix #45 executing feature files outside of the current working directory

## [2.0.1] - 02/05/2021
Expand Down
4 changes: 3 additions & 1 deletion lib/src/gherkin/parameters/float_parameter.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import 'dart:ffi';

import './custom_parameter.dart';

class FloatParameterBase extends CustomParameter<num> {
FloatParameterBase(String name)
: super(name, RegExp(r'(-?[0-9]+\.?[0-9]*)'), (String input) {
final n = num.parse(input);
final n = double.parse(input);
return n;
});
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: gherkin
version: 2.0.2
version: 2.0.3
description: A Gherkin parsers and runner for Dart which is very similar to Cucumber, it provides the base BDD functionality ready for use in platform specific implementations i.e. flutter/web
homepage: https://github.com/jonsamwell/dart_gherkin

Expand Down

0 comments on commit d83ddd6

Please sign in to comment.