fluent-asserts icon indicating copy to clipboard operation
fluent-asserts copied to clipboard

strange error message: results.d(1192): Range violation

Open mw66 opened this issue 5 years ago • 0 comments

#!/usr/bin/env dub
/+ dub.sdl:
dependency "fluent-asserts" version="~>0.13.0"
dependency "dateparser" version="~>3.0.3"
+/

import fluent.asserts;

void main() {
  int[] wa = new int[1442];
  int[] da = new int[6953];
  auto dl = da.length / 5;
  //Assert.lessThan(wa.length, dl+3);   // normal assertion failure
  Assert.   lessThan(wa.length, dl+3);  // strange core.exception.RangeError@../../../.dub/packages/fluent-asserts-0.13.3/fluent-asserts/source/fluentasserts/core/results.d(1192): Range violation
}

Please notice it's the spaces Assert. lessThan(...) that triggered this Range violation.

mw66 avatar Oct 10 '20 06:10 mw66