Daniel Lehman dlehman@esri.com writes:
+static void test_istream_peek(void) +{
- unsigned short testus, nextus;
- basic_stringstream_wchar wss;
- basic_stringstream_char ss;
- basic_string_wchar wstr;
- basic_string_char str;
- IOSB_iostate state;
- int i, next, peek;
- wchar_t wide[64];
- struct _test_istream_peek {
const char *str;
int peek;
int next;
IOSB_iostate state;
- } tests[] = {
{ "", EOF, EOF, IOSTATE_eofbit },
{ "ABCDEF", 'A', 'A', IOSTATE_goodbit },
- };
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
/* char version */
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
peek = (int)call_func1(p_basic_istream_char_peek, &ss.base.base1);
state = (IOSB_iostate)call_func1(p_ios_base_rdstate, &ss.basic_ios.base);
next = (int)call_func1(p_basic_istream_char_get, &ss.base.base1);
'peek' is not tested anywhere.