diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-06 17:28:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-06 17:28:08 +0200 |
commit | 39101a4383d38c1217c44b999a6e3bd199727c60 (patch) | |
tree | a9c5b7d67812e3fa5f5d71310abcfbd14b4aecb7 /tests | |
parent | 7b5d1f33f434034eb7946f459c7fa76b10f620f1 (diff) |
Rework and rename target_triplet
Diffstat (limited to 'tests')
-rw-r--r-- | tests/buildfile | 2 | ||||
-rw-r--r-- | tests/target-triplet/buildfile (renamed from tests/triplet/buildfile) | 2 | ||||
-rw-r--r-- | tests/target-triplet/driver.cxx (renamed from tests/triplet/driver.cxx) | 26 |
3 files changed, 15 insertions, 15 deletions
diff --git a/tests/buildfile b/tests/buildfile index 7259717..8608ed9 100644 --- a/tests/buildfile +++ b/tests/buildfile @@ -4,7 +4,7 @@ d = base64/ cpfile/ dir-iterator/ fdstream/ link/ manifest-parser/ \ manifest-serializer/ manifest-roundtrip/ pager/ path/ prefix-map/ \ - process/ sha256/ small-vector/ strcase/ timestamp/ triplet/ + process/ sha256/ small-vector/ strcase/ timestamp/ target-triplet/ ./: $d include $d diff --git a/tests/triplet/buildfile b/tests/target-triplet/buildfile index 7724f4c..ca8365d 100644 --- a/tests/triplet/buildfile +++ b/tests/target-triplet/buildfile @@ -1,4 +1,4 @@ -# file : tests/triplet/buildfile +# file : tests/target-triplet/buildfile # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file diff --git a/tests/triplet/driver.cxx b/tests/target-triplet/driver.cxx index 96d76cd..fe055db 100644 --- a/tests/triplet/driver.cxx +++ b/tests/target-triplet/driver.cxx @@ -1,4 +1,4 @@ -// file : tests/triplet/driver.cxx -*- C++ -*- +// file : tests/target-triplet/driver.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file @@ -6,7 +6,7 @@ #include <iostream> #include <stdexcept> // invalid_argument -#include <butl/triplet> +#include <butl/target-triplet> using namespace std; using namespace butl; @@ -118,21 +118,21 @@ test (const char* s, const char* version, const char* class_) { - string c; - triplet t (s, c); + target_triplet t (s); + string c (t.string ()); auto cmp = [] (const string& a, const char* e, const char* n) -> bool + { + if (a != e) { - if (a != e) - { - cerr << n << " actual: " << a << endl - << n << " expect: " << e << endl; + cerr << n << " actual: " << a << endl + << n << " expect: " << e << endl; - return false; - } + return false; + } - return true; - }; + return true; + }; return cmp (c, canon, "canonical") && @@ -148,7 +148,7 @@ fail (const char* s) { try { - triplet t (s); + target_triplet t (s); cerr << "nofail: " << s << endl; return false; } |