Skip to content

Commit

Permalink
fixes + test
Browse files Browse the repository at this point in the history
  • Loading branch information
a-givertzman committed Dec 30, 2023
1 parent 1831f75 commit 0496208
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/src/table_schema/field_value.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class FieldValue<T> {
_value = '$value' as T;
return true;
case FieldType.unknown:
_value = '$value' as T;
_value = value;
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ void main() {
test('sets default values with only required parameters provided', () {
const values = [3456, 0, -124 -2345.56, 0.0, 234111.0, 'abc', '', true, _TestObject()];
for(final value in values) {
final fieldValue = FieldValue(value);
expect(fieldValue.value, equals(value));
final fieldValue = FieldValue('$value');
expect(fieldValue.value, equals('$value'));
expect(fieldValue.type, equals(FieldType.string));
}
});
Expand All @@ -23,15 +23,15 @@ void main() {
},
{
'value': '_+-+()*&^%\$;:?№"#@!`~\\|/.,[]{}',
'type': FieldType.int,
'type': FieldType.string,
},
{
'value': '_+-+()*&^%\$;:?№"#@!`~\\|/.,[]{}',
'type': FieldType.double,
'type': FieldType.string,
},
{
'value': '_+-+()*&^%\$;:?№"#@!`~\\|/.,[]{}',
'type': FieldType.bool,
'type': FieldType.string,
},
{
'value': 123,
Expand Down

0 comments on commit 0496208

Please sign in to comment.