stan-dev/stan — pull request #327 by syclik (2013-10-25 15:07:10+00:00)
Title: Fixed unsafe code in bin/print

Changes in this pull request:
- pulled apart functions from main so they can be unit tested
- added unit tests for two functions: `next_index` and `matrix_index`
- changed functions to check input and throw exception if the input is malformed

The added tests are in `src/test/command/print_test.cpp`.