File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -463,10 +463,23 @@ func (t *T) Run(name string, f func(t *T)) bool {
463
463
return ! sub .failed
464
464
}
465
465
466
+ // Deadline reports the time at which the test binary will have
467
+ // exceeded the timeout specified by the -timeout flag.
468
+ //
469
+ // The ok result is false if the -timeout flag indicates “no timeout” (0).
470
+ // For now tinygo always return 0, false.
471
+ //
472
+ // Not Implemented.
473
+ func (t * T ) Deadline () (deadline time.Time , ok bool ) {
474
+ deadline = t .context .deadline
475
+ return deadline , ! deadline .IsZero ()
476
+ }
477
+
466
478
// testContext holds all fields that are common to all tests. This includes
467
479
// synchronization primitives to run at most *parallel tests.
468
480
type testContext struct {
469
- match * matcher
481
+ match * matcher
482
+ deadline time.Time
470
483
}
471
484
472
485
func newTestContext (m * matcher ) * testContext {
You can’t perform that action at this time.
0 commit comments