File: AwaitWait.pm

package info (click to toggle)
libpromise-xs-perl 0.20-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 908 kB
  • sloc: perl: 1,097; ansic: 355; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 266 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package AwaitWait;

use Test::More;

use Promise::XS;

sub test_success {
    my $d = Promise::XS::deferred();

    my @timer_state = shift->($d);

    my @got = $d->promise()->AWAIT_WAIT();

    is( "@got", "42 34", 'top-level await: success' );

    return;
}

1;