Skip to content

Commit

Permalink
Fixed testcase.
Browse files Browse the repository at this point in the history
  • Loading branch information
Olaf Lenz committed Sep 22, 2014
1 parent c0d5ed2 commit a4b4219
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions testsuite/collision-detection-poc.tcl
Expand Up @@ -139,11 +139,12 @@ if {![catch {integrate 0} err]} {
}

set bonds ""
foreach exception [lrange $err 2 end] {
if {[lrange $exception 0 2] != "collision between particles"} {
foreach exception [lrange $err 1 end] {
if {[regexp {collision between particles (\d+) and (\d+)} $exception -> id1 id2]} {
lappend bonds "$id1 $id2"
} else {
error_exit "unexpected exception $exception"
}
lappend bonds "[lindex $exception 3] [lindex $exception 5]"
}
set bonds [lsort $bonds]

Expand Down

0 comments on commit a4b4219

Please sign in to comment.