aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/buildfile2
-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;
}