I think it's simpler to use the `==` operator, see e.g. the discussion here: http://stackoverflow.com/questions/9158894/differences-between-c-string-and-compare

So why not to write this as follows:
```
assert(r1->__str__() == "-x");
```
I didn't actually compile it, but I think it should work.