"Execute 'expr' and check that the returned error ends with 'error_string'"
| 741 | |
| 742 | // "Execute 'expr' and check that the returned error ends with 'error_string'" |
| 743 | void TestErrorString(const string& expr, const string& error_string) { |
| 744 | string stmt = "select " + expr; |
| 745 | vector<FieldSchema> result_types; |
| 746 | string result_row; |
| 747 | Status status = executor_->Exec(stmt, &result_types); |
| 748 | status = executor_->FetchResult(&result_row); |
| 749 | ASSERT_FALSE(status.ok()); |
| 750 | // Ignore the tailing '\n' characters when matching |
| 751 | string actual_msg = boost::trim_right_copy(status.msg().msg()); |
| 752 | string expected_msg = boost::trim_right_copy(error_string); |
| 753 | ASSERT_TRUE(EndsWith(actual_msg, expected_msg)) << "Actual: '" |
| 754 | << status.msg().msg() << "'" << endl << "Expected: '" << error_string << "'"; |
| 755 | } |
| 756 | |
| 757 | template <typename T> void TestFixedPointComparisons(bool test_boundaries) { |
| 758 | int64_t t_min = numeric_limits<T>::min(); |
nothing calls this directly
no test coverage detected