| 467 | |
| 468 | bool Default() { ADD_FAILURE(); return false; } |
| 469 | bool String(const typename Encoding::Ch* str, size_t length, bool copy) { |
| 470 | EXPECT_EQ(0, str_); |
| 471 | if (copy) { |
| 472 | str_ = static_cast<typename Encoding::Ch*>(malloc((length + 1) * sizeof(typename Encoding::Ch))); |
| 473 | memcpy(const_cast<typename Encoding::Ch*>(str_), str, (length + 1) * sizeof(typename Encoding::Ch)); |
| 474 | } |
| 475 | else |
| 476 | str_ = str; |
| 477 | length_ = length; |
| 478 | copy_ = copy; |
| 479 | return true; |
| 480 | } |
| 481 | |
| 482 | const typename Encoding::Ch* str_; |
| 483 | size_t length_; |
nothing calls this directly
no outgoing calls
no test coverage detected