Skip to content

Commit

Permalink
fix handling values failing after an assert started
Browse files Browse the repository at this point in the history
  • Loading branch information
gedaiu committed May 2, 2022
1 parent 430bed1 commit 6441d65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion source/fluentasserts/core/evaluation.d
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ class ArrayEquable(U: T[], T) : EquableValue {
}

@trusted EquableValue[] toArray() {
try { "array.toArray".writeln; } catch(Exception) {}
static if(is(T == void)) {
return [];
} else {
Expand Down
4 changes: 4 additions & 0 deletions source/fluentasserts/core/operations/registry.d
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ class Registry {

///
IResult[] handle(ref Evaluation evaluation) @safe nothrow {
if(evaluation.operationName == "" || evaluation.operationName == "to" || evaluation.operationName == "should") {
return [];
}

auto operation = this.get(
evaluation.currentValue.typeName,
evaluation.expectedValue.typeName,
Expand Down

0 comments on commit 6441d65

Please sign in to comment.