SelfTests class Null safety

Some built-in regression tests. There aren't just an excuse to flash "running" when a user triggers the 16C's self test fonction. It's also a way of easily running some of the tests involving integer and floating point behavior in different browsers. This might be a bit of a pain point for Dart, since the numeric types behave differently given JavaScript's deficiencies in ths regard.

I note that I've seen Dart documentation that mention the 53 bit mantissa of the underlying double that JavaScript uses, but it seems that Dart clamps ints on (perhaps only some?) JavaScript runtime(s) to 32 bits. It seems the prudent thing to do for interoperable code is to limit usage of the int type to 32 bit ints, which is unfortunate. In fairness, the Dart language designers were in a bit of a bind, with no really good answers for putting a normal type system on top of JavaScript's odd (and IMHO terrible) choice as regards integers.

Implementers

Constructors

SelfTests({bool inCalculator = true})

Properties

errorsSeen int
read / write
hashCode int
The hash code for this object.
read-onlyinherited
inCalculator bool
final
pauseEvery int
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
testsRun int
read / write

Methods

expect(Object? val, Object? expected, {String? reason}) Future<void>
fd(double d) String
newController() Controller
Create a new controller with its model
newModel() Model<Operation>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
runAll() Future<void>
test(String msg, Future<void> tests()) Future<void>
testFloatValues() Future<void>
testJson() Future<void>
testNumbers() Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited