[libcxx] r283749 - Add tests for LWG2544. We already implement this; just adding tests to make sure that we keep doing it.
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 10 07:10:46 PDT 2016
Author: marshall
Date: Mon Oct 10 09:10:45 2016
New Revision: 283749
URL: http://llvm.org/viewvc/llvm-project?rev=283749&view=rev
Log:
Add tests for LWG2544. We already implement this; just adding tests to make sure that we keep doing it.
Modified:
libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_equal/equal.pass.cpp
libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!=/not_equal.pass.cpp
libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op==/equal.pass.cpp
Modified: libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_equal/equal.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_equal/equal.pass.cpp?rev=283749&r1=283748&r2=283749&view=diff
==============================================================================
--- libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_equal/equal.pass.cpp (original)
+++ libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_equal/equal.pass.cpp Mon Oct 10 09:10:45 2016
@@ -26,26 +26,37 @@ int main()
std::istreambuf_iterator<char> i2(inf2);
std::istreambuf_iterator<char> i3;
std::istreambuf_iterator<char> i4;
+ std::istreambuf_iterator<char> i5(nullptr);
assert( i1.equal(i1));
assert( i1.equal(i2));
assert(!i1.equal(i3));
assert(!i1.equal(i4));
+ assert(!i1.equal(i5));
assert( i2.equal(i1));
assert( i2.equal(i2));
assert(!i2.equal(i3));
assert(!i2.equal(i4));
+ assert(!i2.equal(i5));
assert(!i3.equal(i1));
assert(!i3.equal(i2));
assert( i3.equal(i3));
assert( i3.equal(i4));
+ assert( i3.equal(i5));
assert(!i4.equal(i1));
assert(!i4.equal(i2));
assert( i4.equal(i3));
assert( i4.equal(i4));
+ assert( i4.equal(i5));
+
+ assert(!i5.equal(i1));
+ assert(!i5.equal(i2));
+ assert( i5.equal(i3));
+ assert( i5.equal(i4));
+ assert( i5.equal(i5));
}
{
std::wistringstream inf1(L"abc");
@@ -54,25 +65,36 @@ int main()
std::istreambuf_iterator<wchar_t> i2(inf2);
std::istreambuf_iterator<wchar_t> i3;
std::istreambuf_iterator<wchar_t> i4;
+ std::istreambuf_iterator<wchar_t> i5(nullptr);
assert( i1.equal(i1));
assert( i1.equal(i2));
assert(!i1.equal(i3));
assert(!i1.equal(i4));
+ assert(!i1.equal(i5));
assert( i2.equal(i1));
assert( i2.equal(i2));
assert(!i2.equal(i3));
assert(!i2.equal(i4));
+ assert(!i2.equal(i5));
assert(!i3.equal(i1));
assert(!i3.equal(i2));
assert( i3.equal(i3));
assert( i3.equal(i4));
+ assert( i3.equal(i5));
assert(!i4.equal(i1));
assert(!i4.equal(i2));
assert( i4.equal(i3));
assert( i4.equal(i4));
+ assert( i4.equal(i5));
+
+ assert(!i5.equal(i1));
+ assert(!i5.equal(i2));
+ assert( i5.equal(i3));
+ assert( i5.equal(i4));
+ assert( i5.equal(i5));
}
}
Modified: libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!=/not_equal.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op%21%3D/not_equal.pass.cpp?rev=283749&r1=283748&r2=283749&view=diff
==============================================================================
--- libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!=/not_equal.pass.cpp (original)
+++ libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!=/not_equal.pass.cpp Mon Oct 10 09:10:45 2016
@@ -28,26 +28,37 @@ int main()
std::istreambuf_iterator<char> i2(inf2);
std::istreambuf_iterator<char> i3;
std::istreambuf_iterator<char> i4;
+ std::istreambuf_iterator<char> i5(nullptr);
assert(!(i1 != i1));
assert(!(i1 != i2));
assert( (i1 != i3));
assert( (i1 != i4));
+ assert( (i1 != i5));
assert(!(i2 != i1));
assert(!(i2 != i2));
assert( (i2 != i3));
assert( (i2 != i4));
+ assert( (i2 != i5));
assert( (i3 != i1));
assert( (i3 != i2));
assert(!(i3 != i3));
assert(!(i3 != i4));
+ assert(!(i3 != i5));
assert( (i4 != i1));
assert( (i4 != i2));
assert(!(i4 != i3));
assert(!(i4 != i4));
+ assert(!(i4 != i5));
+
+ assert( (i5 != i1));
+ assert( (i5 != i2));
+ assert(!(i5 != i3));
+ assert(!(i5 != i4));
+ assert(!(i5 != i5));
}
{
std::wistringstream inf1(L"abc");
@@ -56,25 +67,36 @@ int main()
std::istreambuf_iterator<wchar_t> i2(inf2);
std::istreambuf_iterator<wchar_t> i3;
std::istreambuf_iterator<wchar_t> i4;
+ std::istreambuf_iterator<wchar_t> i5(nullptr);
assert(!(i1 != i1));
assert(!(i1 != i2));
assert( (i1 != i3));
assert( (i1 != i4));
+ assert( (i1 != i5));
assert(!(i2 != i1));
assert(!(i2 != i2));
assert( (i2 != i3));
assert( (i2 != i4));
+ assert( (i2 != i5));
assert( (i3 != i1));
assert( (i3 != i2));
assert(!(i3 != i3));
assert(!(i3 != i4));
+ assert(!(i3 != i5));
assert( (i4 != i1));
assert( (i4 != i2));
assert(!(i4 != i3));
assert(!(i4 != i4));
+ assert(!(i4 != i5));
+
+ assert( (i5 != i1));
+ assert( (i5 != i2));
+ assert(!(i5 != i3));
+ assert(!(i5 != i4));
+ assert(!(i5 != i5));
}
}
Modified: libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op==/equal.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op%3D%3D/equal.pass.cpp?rev=283749&r1=283748&r2=283749&view=diff
==============================================================================
--- libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op==/equal.pass.cpp (original)
+++ libcxx/trunk/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op==/equal.pass.cpp Mon Oct 10 09:10:45 2016
@@ -28,26 +28,37 @@ int main()
std::istreambuf_iterator<char> i2(inf2);
std::istreambuf_iterator<char> i3;
std::istreambuf_iterator<char> i4;
+ std::istreambuf_iterator<char> i5(nullptr);
assert( (i1 == i1));
assert( (i1 == i2));
assert(!(i1 == i3));
assert(!(i1 == i4));
+ assert(!(i1 == i5));
assert( (i2 == i1));
assert( (i2 == i2));
assert(!(i2 == i3));
assert(!(i2 == i4));
+ assert(!(i2 == i5));
assert(!(i3 == i1));
assert(!(i3 == i2));
assert( (i3 == i3));
assert( (i3 == i4));
+ assert( (i3 == i5));
assert(!(i4 == i1));
assert(!(i4 == i2));
assert( (i4 == i3));
assert( (i4 == i4));
+ assert( (i4 == i5));
+
+ assert(!(i5 == i1));
+ assert(!(i5 == i2));
+ assert( (i5 == i3));
+ assert( (i5 == i4));
+ assert( (i5 == i5));
}
{
std::wistringstream inf1(L"abc");
@@ -56,25 +67,36 @@ int main()
std::istreambuf_iterator<wchar_t> i2(inf2);
std::istreambuf_iterator<wchar_t> i3;
std::istreambuf_iterator<wchar_t> i4;
+ std::istreambuf_iterator<wchar_t> i5(nullptr);
assert( (i1 == i1));
assert( (i1 == i2));
assert(!(i1 == i3));
assert(!(i1 == i4));
+ assert(!(i1 == i5));
assert( (i2 == i1));
assert( (i2 == i2));
assert(!(i2 == i3));
assert(!(i2 == i4));
+ assert(!(i2 == i5));
assert(!(i3 == i1));
assert(!(i3 == i2));
assert( (i3 == i3));
assert( (i3 == i4));
+ assert( (i3 == i5));
assert(!(i4 == i1));
assert(!(i4 == i2));
assert( (i4 == i3));
assert( (i4 == i4));
+ assert( (i4 == i5));
+
+ assert(!(i5 == i1));
+ assert(!(i5 == i2));
+ assert( (i5 == i3));
+ assert( (i5 == i4));
+ assert( (i5 == i5));
}
}
More information about the cfe-commits
mailing list