]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/1.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 21_strings / basic_string / operations / compare / char / 1.cc
index 55027b3b349ceb244fce5d9dfa9e1c391d0efc56..67dbf368081b1a5902951dcf2f6e02231cd1399f 100644 (file)
@@ -1,6 +1,6 @@
 // 980930 bkoz work with libstdc++v3
 
-// Copyright (C) 1998-2016 Free Software Foundation, Inc.
+// Copyright (C) 1998-2017 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -41,7 +41,6 @@ test_value(int result, want_value expected);
 int
 test_value(int result, want_value expected)
 {
-  bool test __attribute__((unused)) = true;
   bool pass = false;
 
   switch (expected) {
@@ -80,10 +79,10 @@ test01()
   test_value(strcmp(str_1.data(), str_0.data()), lt);
   test_value(strcmp(str_0.data(), str_1.data()), gt);
   test_value(strncmp(str_1.data(), str_0.data(), 6), z);
-  test_value(strncmp(str_1.data(), str_0.data(), 14), lt);
+  test_value(strncmp(str_1.data(), str_0.data(), 10), lt);
   test_value(memcmp(str_1.data(), str_0.data(), 6), z);
-  test_value(memcmp(str_1.data(), str_0.data(), 14), lt);
-  test_value(memcmp("costa marbella", "costa rica", 14), lt);
+  test_value(memcmp(str_1.data(), str_0.data(), 10), lt);
+  test_value(memcmp("costa marbella", "costa rica", 10), lt);
 
   // int compare(const basic_string& str) const;
   test_value(str_0.compare(str_1), gt); //because r>m