REBOL3 tracker
  0.9.12 beta
Ticket #0002231 User: anonymous


Previous Next
TypeBug Statussubmitted Date30-Jul-2015 12:26
Versionr3 master CategoryUnspecified Submitted byfork
PlatformAll Severityminor Prioritynormal

Summary ASSERT copies only 3 values for failed expression, also flaky
Description If an assertion fails, the resulting error message attempts to capture the failing expression that it detected. For some reason it only takes up to 3 elements of that expression.

>> assert [true 1 + 3 = 2 true]
** Script error: assertion failed for: [1 + 3] ; <-- HERE
** Where: assert
** Near: assert [true 1 + 3 = 2 true]

Additionally: because it only copies the expression out after running the assert, it can fail to capture an expression correctly if it modifies the block:

>> conditions: [true true (clear conditions false) true]
== [true true (clear conditions false) true]

>> assert conditions
** Script error: assertion failed for: []
** Where: assert
** Near: assert conditions
Example code


Assigned ton/a Fixed in- Last Update30-Jul-2015 12:26


Date User Field Action Change
30-Jul-2015 12:26 Fork Ticket Added -