diff options
author | Alex Brainman <alex.brainman@gmail.com> | 2015-07-23 11:42:51 +1000 |
---|---|---|
committer | Alex Brainman <alex.brainman@gmail.com> | 2015-09-23 09:01:08 +0000 |
commit | d02a4c1d60a875e5d4dd5300860e63d7e6ad8151 (patch) | |
tree | 799be12cd43726d2f00fc793b1050450221701ea /src/runtime/syscall_windows_test.go | |
parent | b0a1f6462f34c9907ea35813b7ffa0f600646e80 (diff) | |
download | go-d02a4c1d60a875e5d4dd5300860e63d7e6ad8151.tar.gz go-d02a4c1d60a875e5d4dd5300860e63d7e6ad8151.zip |
runtime: test that timeBeginPeriod succeeds
Change-Id: I5183f767dadb6d24a34d2460d02e97ddbaab129a
Reviewed-on: https://go-review.googlesource.com/12546
Run-TryBot: Minux Ma <minux@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/syscall_windows_test.go')
-rw-r--r-- | src/runtime/syscall_windows_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/syscall_windows_test.go b/src/runtime/syscall_windows_test.go index 677eb5f82d..4bedd4add4 100644 --- a/src/runtime/syscall_windows_test.go +++ b/src/runtime/syscall_windows_test.go @@ -640,3 +640,10 @@ uintptr_t cfunc(callback f, uintptr_t n) { t.Errorf("got %d want %d", got, want) } } + +func TestTimeBeginPeriod(t *testing.T) { + const TIMERR_NOERROR = 0 + if *runtime.TimeBeginPeriodRetValue != TIMERR_NOERROR { + t.Fatalf("timeBeginPeriod failed: it returned %d", *runtime.TimeBeginPeriodRetValue) + } +} |