summaryrefslogtreecommitdiffstats
path: root/tests/platform.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-08-04 07:48:39 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-08-04 07:48:39 (GMT)
commitf4b9d9697eed263a69362a80ff78b872ad123e0c (patch)
treeebbe618f12e927b1158cf966062bcb0d7194f73b /tests/platform.test
parent7fe49bb7164153f93609697d3501cf9277b87a5c (diff)
parent24ef33dc101a3e9114318b884c1e99d792f4739d (diff)
downloadtcl-f4b9d9697eed263a69362a80ff78b872ad123e0c.zip
tcl-f4b9d9697eed263a69362a80ff78b872ad123e0c.tar.gz
tcl-f4b9d9697eed263a69362a80ff78b872ad123e0c.tar.bz2
Diffstat (limited to 'tests/platform.test')
-rw-r--r--tests/platform.test13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/platform.test b/tests/platform.test
index 8cb8dcd..aab7c78 100644
--- a/tests/platform.test
+++ b/tests/platform.test
@@ -14,7 +14,10 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
namespace import -force ::tcltest::*
}
-testConstraint testWinCPUID [llength [info commands testwincpuid]]
+::tcltest::loadTestedCommands
+catch [list package require -exact Tcltest [info patchlevel]]
+
+testConstraint testCPUID [llength [info commands testcpuid]]
test platform-1.1 {TclpSetVariables: tcl_platform} {
interp create i
@@ -36,12 +39,12 @@ test platform-2.1 {tcl_platform(wordSize) indicates size of native word} {
list [expr {$result < 0}] [expr {$result ^ int($result - 1)}]
} {1 -1}
-# On Windows, test that the CPU ID works
+# On Windows/UNIX, test that the CPU ID works
-test platform-3.1 {CPU ID on Windows } \
- -constraints testWinCPUID \
+test platform-3.1 {CPU ID on Windows/UNIX} \
+ -constraints testCPUID \
-body {
- set cpudata [testwincpuid 0]
+ set cpudata [testcpuid 0]
binary format iii \
[lindex $cpudata 1] \
[lindex $cpudata 3] \