Skip to content

Commit

Permalink
fix typo ByteConvertionError -> ByteConversionError
Browse files Browse the repository at this point in the history
  • Loading branch information
pperle committed Jan 13, 2024
1 parent 899933b commit 0023cb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions lib/src/util/byte_conversion_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import 'dart:typed_data';

import 'package:tflite_flutter/tflite_flutter.dart';

class ByteConvertionError extends ArgumentError {
ByteConvertionError({
class ByteConversionError extends ArgumentError {
ByteConversionError({
required this.input,
required this.tensorType,
}) : super(
Expand Down Expand Up @@ -58,7 +58,7 @@ class ByteConversionUtils {
bdata.setFloat32(0, o.toDouble(), Endian.little);
return buffer.asUint8List();
}
throw ByteConvertionError(
throw ByteConversionError(
input: o,
tensorType: tensorType,
);
Expand All @@ -72,7 +72,7 @@ class ByteConversionUtils {
bdata.setUint8(0, o);
return buffer.asUint8List();
}
throw ByteConvertionError(
throw ByteConversionError(
input: o,
tensorType: tensorType,
);
Expand All @@ -86,7 +86,7 @@ class ByteConversionUtils {
bdata.setInt32(0, o, Endian.little);
return buffer.asUint8List();
}
throw ByteConvertionError(
throw ByteConversionError(
input: o,
tensorType: tensorType,
);
Expand All @@ -100,7 +100,7 @@ class ByteConversionUtils {
bdata.setInt64(0, o, Endian.big);
return buffer.asUint8List();
}
throw ByteConvertionError(
throw ByteConversionError(
input: o,
tensorType: tensorType,
);
Expand All @@ -114,7 +114,7 @@ class ByteConversionUtils {
bdata.setInt16(0, o, Endian.little);
return buffer.asUint8List();
}
throw ByteConvertionError(
throw ByteConversionError(
input: o,
tensorType: tensorType,
);
Expand All @@ -125,7 +125,7 @@ class ByteConversionUtils {
if (o is num) {
return ByteConversionUtils.floatToFloat16Bytes(o.toDouble());
}
throw ByteConvertionError(
throw ByteConversionError(
input: o,
tensorType: tensorType,
);
Expand All @@ -139,7 +139,7 @@ class ByteConversionUtils {
bdata.setInt8(0, o);
return buffer.asUint8List();
}
throw ByteConvertionError(
throw ByteConversionError(
input: o,
tensorType: tensorType,
);
Expand Down
2 changes: 1 addition & 1 deletion test/util/byte_conversion_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void main() {
test('float to int8', () async {
expect(
() => ByteConversionUtils.convertObjectToBytes(1.1, TensorType.int8),
throwsA(isA<ByteConvertionError>()));
throwsA(isA<ByteConversionError>()));
});

test('float to None', () async {
Expand Down

0 comments on commit 0023cb0

Please sign in to comment.