stan-dev/stan — pull request #1068 by syclik (2014-10-05 00:54:44+00:00)
Title: Feature/issue 1066 check nonzero size message

#### Summary:

Fixes the message from check nonzero size. It used to say "has size uninitialized" for vector/matrix of stan::agrad::var.

#### Intended Effect:

Changes the message so it says "has size 0".

#### How to Verify:

Run the unit tests in `src/test/unit/math/error_handling/matrix/check_nonzero_size_test.cpp` and `src/test/unit-agrad-rev/error_handling/matrix/check_nonzero_size_test.cpp`.

#### Side Effects:

Added some test utility functions. Moved `count_matches()` to `src/test/unit/util.hpp` and added a new test macro `EXPECT_THROW_MSG()` which is like `EXPECT_THROW` with an additional string argument that must be present in the message from the exception.

#### Documentation:

C++ doc has been updated.

#### Reviewer Suggestions:

Anyone.