aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-03-10 10:04:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-03-10 10:04:43 +0200
commita9844a31c639ed5e0c8efee92d644557b8410429 (patch)
tree938dbdcd635082d1c4c6140d54bc500cb7baa086 /tests
parentb211edb78d90939eefd6e784c940c9a6ad9ccc2f (diff)
Derive target class from target triplet for some targets
Diffstat (limited to 'tests')
-rw-r--r--tests/triplet/driver.cxx29
1 files changed, 16 insertions, 13 deletions
diff --git a/tests/triplet/driver.cxx b/tests/triplet/driver.cxx
index fdd5939..51bb7e0 100644
--- a/tests/triplet/driver.cxx
+++ b/tests/triplet/driver.cxx
@@ -20,7 +20,8 @@ test (const char*,
const char* cpu,
const char* vendor,
const char* system,
- const char* version);
+ const char* version,
+ const char* class_ = "other");
int
main ()
@@ -49,31 +50,31 @@ main ()
assert (test ("arm-none-linux-gnueabi",
"arm-linux-gnueabi",
- "arm", "", "linux-gnueabi", ""));
+ "arm", "", "linux-gnueabi", "", "linux"));
assert (test ("arm-softfloat-linux-gnu",
"arm-softfloat-linux-gnu",
- "arm", "softfloat", "linux-gnu", ""));
+ "arm", "softfloat", "linux-gnu", "", "linux"));
assert (test ("i686-pc-mingw32",
"i686-mingw32",
- "i686", "", "mingw32", ""));
+ "i686", "", "mingw32", "", "windows"));
assert (test ("i686-w64-mingw32",
"i686-w64-mingw32",
- "i686", "w64", "mingw32", ""));
+ "i686", "w64", "mingw32", "", "windows"));
assert (test ("i686-lfs-linux-gnu",
"i686-lfs-linux-gnu",
- "i686", "lfs", "linux-gnu", ""));
+ "i686", "lfs", "linux-gnu", "", "linux"));
assert (test ("x86_64-unknown-linux-gnu",
"x86_64-linux-gnu",
- "x86_64", "", "linux-gnu", ""));
+ "x86_64", "", "linux-gnu", "", "linux"));
assert (test ("x86_64-linux-gnux32",
"x86_64-linux-gnux32",
- "x86_64", "", "linux-gnux32", ""));
+ "x86_64", "", "linux-gnux32", "", "linux"));
// Removal of none-.
//
@@ -89,11 +90,11 @@ main ()
//
assert (test ("x86_64-apple-darwin14.5.0",
"x86_64-apple-darwin14.5.0",
- "x86_64", "apple", "darwin", "14.5.0"));
+ "x86_64", "apple", "darwin", "14.5.0", "macosx"));
assert (test ("x86_64-unknown-freebsd10.2",
"x86_64-freebsd10.2",
- "x86_64", "", "freebsd", "10.2"));
+ "x86_64", "", "freebsd", "10.2", "freebsd"));
assert (test ("x86_64-pc-openbsd5.6",
"x86_64-openbsd5.6",
@@ -105,7 +106,7 @@ main ()
assert (test ("x86_64-microsoft-win32-msvc14.0",
"x86_64-microsoft-win32-msvc14.0",
- "x86_64", "microsoft", "win32-msvc", "14.0"));
+ "x86_64", "microsoft", "win32-msvc", "14.0", "windows"));
}
static bool
@@ -114,7 +115,8 @@ test (const char* s,
const char* cpu,
const char* vendor,
const char* system,
- const char* version)
+ const char* version,
+ const char* class_)
{
string c;
triplet t (s, c);
@@ -137,7 +139,8 @@ test (const char* s,
cmp (t.cpu, cpu, "cpu") &&
cmp (t.vendor, vendor, "vendor") &&
cmp (t.system, system, "system") &&
- cmp (t.version, version, "version");
+ cmp (t.version, version, "version") &&
+ cmp (t.class_, class_, "class");
}
static bool