Orivej Desh b66bb6b71f Fix undefined in core-test and printf-test (#1345)
* Fix undefined in core-test

Fixes "reference binding to null pointer" in BufferTest.Ctor

buffer.operator[] attempts to return a reference to `buffer.ptr_[0]` when `ptr_`
in `mock_buffer<int> buffer` is null.

* Fix undefined in printf-test

Fixes "signed integer overflow" in PrintfTest.Length

This occurs in `TestLength<long long>("ll")`, since its minimum value minus one
does not fit in long long.

* Fix undefined in printf %0$

Printf counts arguments from 1.

Fixes "shift exponent -4 is negative" in PrintfTest.InvalidArgIndex.

`do_get` is called with index -1 when `basic_printf_context.arg` is called with
id 4294967295 when basic_printf_context::get_arg subtracts 1 from arg_index 0 in
the format string "%0$d".
2019-10-08 06:28:39 -07:00
..
2019-07-25 19:39:41 +03:00
2017-03-09 06:09:43 -08:00
2019-06-30 06:10:07 -07:00
2019-09-01 13:08:53 -07:00
2019-09-08 09:21:30 -07:00
2019-06-15 09:44:51 -07:00
2019-07-07 17:14:26 -07:00
2019-08-11 11:38:16 -07:00
2019-01-13 06:58:20 -08:00