Debian Codegraph @

tests/testthat/_snaps/private-loops.md

raw symbols SCIP
1 # Private event loops
2
3 Code
4 with_loop(l, later(function() message("foo")))
5 Condition
6 Error in `with_loop()`:
7 ! loop has been destroyed!
8
9 ---
10
11 Code
12 run_now(loop = l)
13 Condition
14 Error:
15 ! CallbackRegistry does not exist.
16
17 ---
18
19 Code
20 destroy_loop(global_loop())
21 Condition
22 Error:
23 ! Can't destroy global loop.
24
25 # Temporary event loops
26
27 Code
28 with_loop(l, {
29 later(function() x <<- x + 1)
30 run_now()
31 })
32 Condition
33 Error in `with_loop()`:
34 ! loop has been destroyed!
35
36 # list_queue
37
38 Code
39 list_queue(l)
40 Condition
41 Error:
42 ! CallbackRegistry does not exist.
43
44 # next_op_secs works
45
46 Code
47 next_op_secs(loop)
48 Condition
49 Error:
50 ! CallbackRegistry does not exist.
51
52 # parameter validation works
53
54 Code
55 with_loop(loop, destroy_loop(loop))
56 Condition
57 Error:
58 ! Can't destroy current loop.
59
60 ---
61
62 Code
63 with_loop(loop, { })
64 Condition
65 Error in `with_loop()`:
66 ! loop has been destroyed!
67
68 ---
69
70 Code
71 loop_empty(loop)
72 Condition
73 Error:
74 ! CallbackRegistry does not exist.
75
76 ---
77
78 Code
79 create_loop(parent = "invalid")
80 Condition
81 Error in `create_loop()`:
82 ! `parent` must be NULL or an event_loop object.
83
84 # esoteric error handlers
85
86 Code
87 notify_r_ref_deleted(global_loop())
88 Condition
89 Error:
90 ! Can't notify that reference to global loop is deleted.
91
92 ---
93
94 Code
95 with_loop(loop, notify_r_ref_deleted(loop))
96 Condition
97 Error:
98 ! Can't notify that reference to current loop is deleted.
99
100 ---
101
102 Code
103 with_loop(loop, {
104 .loops[[as.character(loop$id)]] <- NULL
105 current_loop()
106 })
107 Condition
108 Error in `current_loop()`:
109 ! Current loop with id 43 not found.
110