Home
last modified time | relevance | path

Searched refs:sb (Results 1 – 25 of 203) sorted by relevance

123456789

/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/
Dcp_size_cp.pass.cpp23 std::strstreambuf sb(buf, sizeof(buf)); in main() local
24 assert(sb.sgetc() == 'a'); in main()
25 assert(sb.snextc() == 'b'); in main()
26 assert(sb.snextc() == 'c'); in main()
27 assert(sb.snextc() == 'd'); in main()
28 assert(sb.snextc() == 0); in main()
29 assert(sb.snextc() == EOF); in main()
33 std::strstreambuf sb(buf, 0); in main() local
34 assert(sb.sgetc() == 'a'); in main()
35 assert(sb.snextc() == 'b'); in main()
[all …]
Dscp_size_scp.pass.cpp23 std::strstreambuf sb(buf, sizeof(buf)); in main() local
24 assert(sb.sgetc() == 'a'); in main()
25 assert(sb.snextc() == 'b'); in main()
26 assert(sb.snextc() == 'c'); in main()
27 assert(sb.snextc() == 'd'); in main()
28 assert(sb.snextc() == 0); in main()
29 assert(sb.snextc() == EOF); in main()
33 std::strstreambuf sb(buf, 0); in main() local
34 assert(sb.sgetc() == 'a'); in main()
35 assert(sb.snextc() == 'b'); in main()
[all …]
Ducp_size_ucp.pass.cpp23 std::strstreambuf sb(buf, sizeof(buf)); in main() local
24 assert(sb.sgetc() == 'a'); in main()
25 assert(sb.snextc() == 'b'); in main()
26 assert(sb.snextc() == 'c'); in main()
27 assert(sb.snextc() == 'd'); in main()
28 assert(sb.snextc() == 0); in main()
29 assert(sb.snextc() == EOF); in main()
33 std::strstreambuf sb(buf, 0); in main() local
34 assert(sb.sgetc() == 'a'); in main()
35 assert(sb.snextc() == 'b'); in main()
[all …]
Dcucp_size.pass.cpp23 std::strstreambuf sb(buf, sizeof(buf)); in main() local
24 assert(sb.sgetc() == 'a'); in main()
25 assert(sb.snextc() == 'b'); in main()
26 assert(sb.snextc() == 'c'); in main()
27 assert(sb.snextc() == 'd'); in main()
28 assert(sb.snextc() == 0); in main()
29 assert(sb.snextc() == EOF); in main()
33 std::strstreambuf sb(buf, 0); in main() local
34 assert(sb.sgetc() == 'a'); in main()
35 assert(sb.snextc() == 'b'); in main()
[all …]
Dccp_size.pass.cpp23 std::strstreambuf sb(buf, sizeof(buf)); in main() local
24 assert(sb.sgetc() == 'a'); in main()
25 assert(sb.snextc() == 'b'); in main()
26 assert(sb.snextc() == 'c'); in main()
27 assert(sb.snextc() == 'd'); in main()
28 assert(sb.snextc() == 0); in main()
29 assert(sb.snextc() == EOF); in main()
33 std::strstreambuf sb(buf, 0); in main() local
34 assert(sb.sgetc() == 'a'); in main()
35 assert(sb.snextc() == 'b'); in main()
[all …]
Dcscp_size.pass.cpp23 std::strstreambuf sb(buf, sizeof(buf)); in main() local
24 assert(sb.sgetc() == 'a'); in main()
25 assert(sb.snextc() == 'b'); in main()
26 assert(sb.snextc() == 'c'); in main()
27 assert(sb.snextc() == 'd'); in main()
28 assert(sb.snextc() == 0); in main()
29 assert(sb.snextc() == EOF); in main()
33 std::strstreambuf sb(buf, 0); in main() local
34 assert(sb.sgetc() == 'a'); in main()
35 assert(sb.snextc() == 'b'); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/
Doverflow.pass.cpp41 testbuf<char> sb("abc"); in main() local
42 assert(sb.sputc('1') == '1'); in main()
43 assert(sb.str() == "1bc"); in main()
44 assert(sb.sputc('2') == '2'); in main()
45 assert(sb.str() == "12c"); in main()
46 assert(sb.sputc('3') == '3'); in main()
47 assert(sb.str() == "123"); in main()
48 assert(sb.sputc('4') == '4'); in main()
49 assert(sb.str() == "1234"); in main()
50 assert(sb.sputc('5') == '5'); in main()
[all …]
Dseekpos.pass.cpp24 std::stringbuf sb("0123456789", std::ios_base::in); in main() local
25 assert(sb.pubseekpos(3, std::ios_base::out) == -1); in main()
26 assert(sb.pubseekpos(3, std::ios_base::in | std::ios_base::out) == -1); in main()
27 assert(sb.pubseekpos(3, std::ios_base::in) == 3); in main()
28 assert(sb.sgetc() == '3'); in main()
31 std::stringbuf sb("0123456789", std::ios_base::out); in main() local
32 assert(sb.pubseekpos(3, std::ios_base::in) == -1); in main()
33 assert(sb.pubseekpos(3, std::ios_base::out | std::ios_base::in) == -1); in main()
34 assert(sb.pubseekpos(3, std::ios_base::out) == 3); in main()
35 assert(sb.sputc('a') == 'a'); in main()
[all …]
Dseekoff.pass.cpp24 std::stringbuf sb("0123456789", std::ios_base::in); in main() local
25 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1); in main()
26 assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == -1); in main()
27 assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == -1); in main()
28 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in | std::ios_base::out) == -1); in main()
29 assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in | std::ios_base::out) == -1); in main()
30 assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in | std::ios_base::out) == -1); in main()
31 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); in main()
32 assert(sb.sgetc() == '3'); in main()
33 assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in) == 6); in main()
[all …]
Dunderflow.pass.cpp35 testbuf<char> sb("123"); in main() local
36 sb.pbump(3); in main()
37 assert(sb.underflow() == '1'); in main()
38 assert(sb.underflow() == '1'); in main()
39 assert(sb.snextc() == '2'); in main()
40 assert(sb.underflow() == '2'); in main()
41 assert(sb.underflow() == '2'); in main()
42 assert(sb.snextc() == '3'); in main()
43 assert(sb.underflow() == '3'); in main()
44 assert(sb.underflow() == '3'); in main()
[all …]
Dpbackfail.pass.cpp39 testbuf<char> sb("123", std::ios_base::in); in main() local
40 assert(sb.sgetc() == '1'); in main()
41 assert(sb.snextc() == '2'); in main()
42 assert(sb.snextc() == '3'); in main()
43 assert(sb.sgetc() == '3'); in main()
44 assert(sb.snextc() == std::char_traits<char>::eof()); in main()
45 assert(sb.pbackfail('3') == '3'); in main()
46 assert(sb.pbackfail('3') == std::char_traits<char>::eof()); in main()
47 assert(sb.pbackfail('2') == '2'); in main()
48 assert(sb.pbackfail(std::char_traits<char>::eof()) != std::char_traits<char>::eof()); in main()
[all …]
Dsetbuf.pass.cpp23 std::stringbuf sb("0123456789"); in main() local
24 assert(sb.pubsetbuf(0, 0) == &sb); in main()
25 assert(sb.str() == "0123456789"); in main()
28 std::wstringbuf sb(L"0123456789"); in main() local
29 assert(sb.pubsetbuf(0, 0) == &sb); in main()
30 assert(sb.str() == L"0123456789"); in main()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/
Doverflow.pass.cpp23 std::strstreambuf sb(buf, sizeof(buf), buf); in main() local
24 assert(sb.sputc('1') == '1'); in main()
25 assert(sb.str() == std::string("1bc")); in main()
26 assert(sb.sputc('2') == '2'); in main()
27 assert(sb.str() == std::string("12c")); in main()
28 assert(sb.sputc('3') == '3'); in main()
29 assert(sb.str() == std::string("123")); in main()
30 assert(sb.sputc('4') == '4'); in main()
31 assert(sb.str() == std::string("1234")); in main()
32 assert(sb.sputc('5') == '5'); in main()
[all …]
Dpbackfail.pass.cpp35 test sb(buf, 0); in main() local
36 assert(sb.sgetc() == '1'); in main()
37 assert(sb.snextc() == '2'); in main()
38 assert(sb.snextc() == '3'); in main()
39 assert(sb.sgetc() == '3'); in main()
40 assert(sb.snextc() == EOF); in main()
41 assert(sb.pbackfail('3') == '3'); in main()
42 assert(sb.pbackfail('3') == EOF); in main()
43 assert(sb.pbackfail('2') == '2'); in main()
44 assert(sb.pbackfail(EOF) != EOF); in main()
[all …]
Dseekoff.pass.cpp24 std::strstreambuf sb(buf, 0); in main() local
25 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1); in main()
26 assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == -1); in main()
27 assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == -1); in main()
28 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in | std::ios_base::out) == -1); in main()
29 assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in | std::ios_base::out) == -1); in main()
30 assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in | std::ios_base::out) == -1); in main()
31 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); in main()
32 assert(sb.sgetc() == '3'); in main()
33 assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in) == 6); in main()
[all …]
Dunderflow.pass.cpp35 test sb(buf, 0, buf + 3); in main() local
36 assert(sb.underflow() == '1'); in main()
37 assert(sb.underflow() == '1'); in main()
38 assert(sb.snextc() == '2'); in main()
39 assert(sb.underflow() == '2'); in main()
40 assert(sb.underflow() == '2'); in main()
41 assert(sb.snextc() == '3'); in main()
42 assert(sb.underflow() == '3'); in main()
43 assert(sb.underflow() == '3'); in main()
44 assert(sb.snextc() == EOF); in main()
[all …]
Dseekpos.pass.cpp24 std::strstreambuf sb(buf, 0); in main() local
25 assert(sb.pubseekpos(3, std::ios_base::out) == -1); in main()
26 assert(sb.pubseekpos(3, std::ios_base::in | std::ios_base::out) == -1); in main()
27 assert(sb.pubseekpos(3, std::ios_base::in) == 3); in main()
28 assert(sb.sgetc() == '3'); in main()
32 std::strstreambuf sb(buf, 0, buf); in main() local
33 assert(sb.pubseekpos(3, std::ios_base::in) == 3); in main()
34 assert(sb.pubseekpos(3, std::ios_base::out | std::ios_base::in) == 3); in main()
35 assert(sb.pubseekpos(3, std::ios_base::out) == 3); in main()
36 assert(sb.sputc('a') == 'a'); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream/istream_sentry/
Dctor.pass.cpp72 testbuf<char> sb(" 123"); in main() local
73 std::istream is(&sb); in main()
79 assert(sb.gptr() == sb.eback()); in main()
82 testbuf<wchar_t> sb(L" 123"); in main() local
83 std::wistream is(&sb); in main()
89 assert(sb.gptr() == sb.eback()); in main()
92 testbuf<char> sb(" 123"); in main() local
93 std::istream is(&sb); in main()
98 assert(sb.gptr() == sb.eback() + 3); in main()
101 testbuf<wchar_t> sb(L" 123"); in main() local
[all …]
/ndk/tests/device/stat/jni/
Dstat.c24 struct stat sb; in main() local
31 if (stat(paths[i], &sb) != 0) in main()
36 printf("%14s %6ld: %s%s%s %s %s %s %s\n", paths[i], sb.st_size, in main()
38 printf("%14s %6lld: %s%s%s %s %s %s %s\n", paths[i], sb.st_size, in main()
40 ((sb.st_mode & S_IRUSR)? "r" : " "), in main()
41 ((sb.st_mode & S_IWUSR)? "w" : " "), in main()
42 ((sb.st_mode & S_IXUSR)? "x" : " "), in main()
43 (((sb.st_mode & S_IFMT) == S_IFREG)? "REG" : " "), in main()
44 (((sb.st_mode & S_IFMT) == S_IFDIR)? "DIR" : " "), in main()
45 (((sb.st_mode & S_IFMT) == S_IFLNK)? "LNK" : " "), in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.nonmodifying/alg.search/
Dsearch_n_pred.pass.cpp77 const unsigned sb = sizeof(ib)/sizeof(ib[0]); in test() local
78 assert(std::search_n(Iter(ib), Iter(ib+sb), 0, 0, count_equal()) == Iter(ib)); in test()
79 assert(count_equal::count <= sb); in test()
81 assert(std::search_n(Iter(ib), Iter(ib+sb), 1, 0, count_equal()) == Iter(ib+0)); in test()
82 assert(count_equal::count <= sb); in test()
84 assert(std::search_n(Iter(ib), Iter(ib+sb), 2, 0, count_equal()) == Iter(ib+0)); in test()
85 assert(count_equal::count <= sb); in test()
87 assert(std::search_n(Iter(ib), Iter(ib+sb), 3, 0, count_equal()) == Iter(ib+sb)); in test()
88 assert(count_equal::count <= sb); in test()
90 assert(std::search_n(Iter(ib), Iter(ib+sb), sb, 0, count_equal()) == Iter(ib+sb)); in test()
[all …]
Dsearch_n.pass.cpp42 const unsigned sb = sizeof(ib)/sizeof(ib[0]); in test() local
43 assert(std::search_n(Iter(ib), Iter(ib+sb), 0, 0) == Iter(ib)); in test()
44 assert(std::search_n(Iter(ib), Iter(ib+sb), 1, 0) == Iter(ib+0)); in test()
45 assert(std::search_n(Iter(ib), Iter(ib+sb), 2, 0) == Iter(ib+0)); in test()
46 assert(std::search_n(Iter(ib), Iter(ib+sb), 3, 0) == Iter(ib+sb)); in test()
47 assert(std::search_n(Iter(ib), Iter(ib+sb), sb, 0) == Iter(ib+sb)); in test()
48 assert(std::search_n(Iter(ib), Iter(ib+sb), 0, 1) == Iter(ib)); in test()
49 assert(std::search_n(Iter(ib), Iter(ib+sb), 1, 1) == Iter(ib+2)); in test()
50 assert(std::search_n(Iter(ib), Iter(ib+sb), 2, 1) == Iter(ib+2)); in test()
51 assert(std::search_n(Iter(ib), Iter(ib+sb), 3, 1) == Iter(ib+sb)); in test()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/
Dpcount.pass.cpp22 std::strstreambuf sb; in main() local
23 assert(sb.pcount() == 0); in main()
24 assert(sb.sputc('a') == 'a'); in main()
25 assert(sb.pcount() == 1); in main()
26 assert(sb.sputc(0) == 0); in main()
27 assert(sb.pcount() == 2); in main()
28 assert(sb.str() == std::string("a")); in main()
29 assert(sb.pcount() == 2); in main()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/
Dbool.pass.cpp62 testbuf<char> sb; in main() local
63 std::ostream os(&sb); in main()
66 assert(sb.str() == "0"); in main()
69 testbuf<char> sb; in main() local
70 std::ostream os(&sb); in main()
73 assert(sb.str() == "1"); in main()
76 testbuf<char> sb; in main() local
77 std::ostream os(&sb); in main()
81 assert(sb.str() == "true"); in main()
84 testbuf<char> sb; in main() local
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/std.manip/
Dsetprecision.pass.cpp27 testbuf<char> sb; in main() local
28 std::istream is(&sb); in main()
33 testbuf<char> sb; in main() local
34 std::ostream os(&sb); in main()
39 testbuf<wchar_t> sb; in main() local
40 std::wistream is(&sb); in main()
45 testbuf<wchar_t> sb; in main() local
46 std::wostream os(&sb); in main()
Dsetw.pass.cpp27 testbuf<char> sb; in main() local
28 std::istream is(&sb); in main()
33 testbuf<char> sb; in main() local
34 std::ostream os(&sb); in main()
39 testbuf<wchar_t> sb; in main() local
40 std::wistream is(&sb); in main()
45 testbuf<wchar_t> sb; in main() local
46 std::wostream os(&sb); in main()

123456789