• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

juancastillo0 / wasm_run / 5388429288

20 Jun 2023 03:07AM UTC coverage: 71.207%. Remained the same
5388429288

push

github

juancastillo0
fix dart compilation error "Error: A const constructor can't have a body."

2065 of 2900 relevant lines covered (71.21%)

1.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

69.23
/packages/wasm_run/lib/src/int64_bigint/int64_bigint.dart
1
import 'dart:typed_data';
2

3
import 'package:wasm_run/src/int64_bigint/_int64_bigint_stub.dart'
4
    if (dart.library.io) '_int64_bigint_native.dart'
5
    if (dart.library.html) '_int64_bigint_web.dart' as impl;
6

7
/// [int] for dart:io, Js`BigInt` for dart:html
8
/// Utility static functions in: [i64].
9
/// use [i64.fromInt] or [i64.fromBigInt] to create
10
/// use [i64.toInt] or [i64.toBigInt] to convert
11
/// use [i64.getInt64], [i64.getUint64], [i64.setInt64]
12
/// and [i64.setUint64] to read bytes data
13
typedef I64 = Object; // int | JsBigInt;
14

15
/// Utility static functions for [I64]
16
/// use [i64.fromInt] or [i64.fromBigInt] to create
17
/// use [i64.toInt] or [i64.toBigInt] to convert
18
/// use [i64.getInt64], [i64.getUint64], [i64.setInt64]
19
/// and [i64.setUint64] to read bytes data
20
// ignore: camel_case_types
21
class i64 {
22
  const i64._();
×
23

24
  /// Create [I64] from [int]
25
  static I64 fromInt(int value) => impl.int64FromIntImpl(value);
2✔
26

27
  /// Create [I64] from [BigInt]
28
  static I64 fromBigInt(BigInt value) => impl.int64FromBigIntImpl(value);
2✔
29

30
  /// Convert [I64] to [int]
31
  static int toInt(I64 value) => impl.toIntImpl(value);
2✔
32

33
  /// Convert [I64] to [BigInt]
34
  static BigInt toBigInt(I64 value) => impl.toBigIntImpl(value);
×
35

36
  /// Read [I64] from [bytes] ([ByteData]) in [offset]
37
  static I64 getInt64(ByteData bytes, int offset, Endian endian) =>
1✔
38
      impl.getInt64Bytes(bytes, offset, endian);
1✔
39

40
  /// Read unsigned [I64] from [bytes] ([ByteData]) in [offset]
41
  static I64 getUint64(ByteData bytes, int offset, Endian endian) =>
1✔
42
      impl.getUint64Bytes(bytes, offset, endian);
1✔
43

44
  /// Write [value] ([I64]) in [bytes] ([ByteData]) in [offset]
45
  static void setInt64(ByteData bytes, int offset, I64 value, Endian endian) =>
1✔
46
      impl.setInt64Bytes(bytes, offset, value, endian);
1✔
47

48
  /// Write unsigned [value] ([I64]) in [bytes] ([ByteData]) in [offset]
49
  static void setUint64(ByteData bytes, int offset, I64 value, Endian endian) =>
×
50
      impl.setUint64Bytes(bytes, offset, value, endian);
×
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc