diff options
author | Kevin B Kenny <kennykb@acm.org> | 2004-06-05 17:31:08 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2004-06-05 17:31:08 (GMT) |
commit | eab8709992e59240799ae71ebdd5b6e48bc9d5c0 (patch) | |
tree | 41f21e9ad830c0964087f8b4d6b564c1f631d6ca /tests/platform.test | |
parent | 9baeae995f31e23bd116f478c93131015e25e069 (diff) | |
download | tcl-eab8709992e59240799ae71ebdd5b6e48bc9d5c0.zip tcl-eab8709992e59240799ae71ebdd5b6e48bc9d5c0.tar.gz tcl-eab8709992e59240799ae71ebdd5b6e48bc9d5c0.tar.bz2 |
* generic/tcl.h: Corrected Tcl_WideInt declarations so that the mingw
build works again.
* generic/tclDecls.h: Changes to the tests for
* generic/tclInt.decls: clock frequency in
* generic/tclIntDecls.h: Tcl_WinTime
* generic/tclIntPlatDecls.h: so that any clock frequency
* generic/tclPlatDecls.h: is accepted provided that
* generic/tclStubInit.c: all CPU's in the system share
* tests/platform.test (platform-1.3): a common chip, and hence,
* win/tclWin32Dll.c (TclWinCPUID): presumably, a common clock.
* win/tclWinTest.c (TestwincpuidCmd) This change necessitated a
* win/tclWinTime.c (Tcl_GetTime): 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/platform.test')
-rw-r--r-- | tests/platform.test | 20 |
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: |