add unit tests for eval_bool.
correct eval_bool code based on unit tests.