summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-06-05 17:25:39 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-06-05 17:25:39 (GMT)
commit76a3df0646c3adbd6aafd8a405b1ea67bf4df521 (patch)
tree617dc620eece18a088428f04a8adc51bba840ae6 /tests
parent7cdb9381ace2de8072be890f8225e4bbb21425bd (diff)
downloadtcl-76a3df0646c3adbd6aafd8a405b1ea67bf4df521.zip
tcl-76a3df0646c3adbd6aafd8a405b1ea67bf4df521.tar.gz
tcl-76a3df0646c3adbd6aafd8a405b1ea67bf4df521.tar.bz2
* generic/tcl.h: Corrected Tcl_WideInt declarations so that the mingw
build works again. * generic/tclInt.decls: Changes to the tests for * generic/tclIntPlatDecls.h: clock frequency in Tcl_WinTime * generic/tclStubInit.c: so that any clock frequency * tests/platform.test (platform-1.3): is accepted provided that * win/tclWin32Dll.c (TclWinCPUID): all CPU's in the system share * win/tclWinTest.c (TestwincpuidCmd): a common chip, and hence, * win/tclWinTime.c (Tcl_GetTime): presumably, a common clock. This change necessitated a small burst of assembly code to read CPU ID information, which was added as TclWinCPUID in the internal Stubs. To test this code in the common case of a single-processor machine, a 'testwincpuid' command was added to tclWinTest.c, and a test case in platform.test. Thanks to Jeff Godfrey and Richard Suchenwirth for reporting this bug. [Bug #976722]
Diffstat (limited to 'tests')
-rw-r--r--tests/platform.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/platform.test b/tests/platform.test
index 19001ee..f9d7aca 100644
--- a/tests/platform.test
+++ b/tests/platform.test
@@ -16,6 +16,8 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
namespace import -force ::tcltest::*
}
+testConstraint testWinCPUID [llength [info commands testwincpuid]]
+
test platform-1.1 {TclpSetVariables: tcl_platform} {
interp create i
i eval {catch {unset tcl_platform(debug)}}
@@ -36,6 +38,24 @@ test platform-2.1 {tcl_platform(wordSize) indicates size of native word} {
list [expr {$result < 0}] [expr {$result ^ ($result - 1)}]
} {1 -1}
+# On Windows, test that the CPU ID works
+
+test platform-3.1 {CPU ID on Windows } \
+ -constraints testWinCPUID \
+ -body {
+ set cpudata [testwincpuid 0]
+ binary format iii \
+ [lindex $cpudata 1] \
+ [lindex $cpudata 3] \
+ [lindex $cpudata 2]
+ } \
+ -match regexp \
+ -result {^(?:AuthenticAMD|CentaurHauls|CyrixInstead|GenuineIntel)$}
+
# cleanup
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End: