Package lepl :: Package matchers :: Package _test :: Module float_bug
[hide private]
[frames] | no frames]

Module float_bug

source code

Tests for a weird bug when writing the float (rational at the time) matcher.

This came down to optional entries being mapped in NFA as empty transitions from a single node. If multiple choices were from the same node the empty transition order was incorrect (it's ordered by node number, and the node for the empty transition was created after other nodes, intead of before).

The fix used was to change the node creation order. Other nodes appear to be created correctly. However, it would be better in the longer term, I suspect, to use an ordered dict or similar to store the empty transitions so that the numbering is not needed for order.

Classes [hide private]
  FloatTest