include/store/store_abi_selftest.h

filter: Statementstmt 100% 99 / 99 Branchbran 50.0% 106 / 212 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 65.9% 205 / 311 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/arch/State/Store/Install/Files.pm ↑ Summary xs/abi.xs »
1 #ifndef STORE_ABI_SELFTEST_H
2 #define STORE_ABI_SELFTEST_H
3  
4 /* Walks the table. Every entry is called THROUGH the table, with its answer
5 * checked, so an entry that points at the wrong function, or sits in the
6 * wrong place, fails here by number and not in some consumer's hands.
7 * 0 when every check passed, or the number of the first that failed. */
8  
9 #define STORE_ST(n, cond) do { if (!(cond)) { step = (n); goto done; } } while (0)
10  
11 typedef struct store_st_log { int calls; IV last_was, last_now; } store_st_log;
12  
13 255 static void store_st_watch(pTHX_ void *ud, SV *was, SV *now, SV *st) {
14 255 store_st_log *l = (store_st_log *)ud;
15 PERL_UNUSED_ARG(st);
16 255 l->calls++;
17 255 ▶ l->last_was = SvOK(was) ? SvIV(was) : -1;
Branch: 1 branch
BranchTrueFalseTotal
l->last_was = SvOK(was) ? SvIV(was) : -1; 255 0 255
18 255 ▶ l->last_now = SvOK(now) ? SvIV(now) : -1;
Branch: 1 branch
BranchTrueFalseTotal
l->last_now = SvOK(now) ? SvIV(now) : -1; 255 0 255
19 255 }
20 306 static int store_st_below_100(pTHX_ void *ud, SV *proposed, SV *held, SV *st) {
21 PERL_UNUSED_ARG(held); PERL_UNUSED_ARG(st);
22 306 (*(int *)ud)++;
23 306 return SvIV(proposed) < 100;
24 }
25 51 static SV *store_st_double(pTHX_ void *ud, SV *current) {
26 PERL_UNUSED_ARG(ud);
27 51 return sv_2mortal(newSViv(SvIV(current) * 2));
28 }
29 51 static SV *store_st_nothing(pTHX_ void *ud, SV *current) {
30 PERL_UNUSED_CONTEXT; PERL_UNUSED_ARG(ud); PERL_UNUSED_ARG(current);
31 51 return NULL;
32 }
33 51 static int store_st_count_names(pTHX_ void *ud, const char *name, STRLEN len, int utf8, SV *value) {
34 PERL_UNUSED_CONTEXT; PERL_UNUSED_ARG(name); PERL_UNUSED_ARG(len); PERL_UNUSED_ARG(utf8);
35 51 ▶ if (value) (*(int *)ud)++;
Branch: 1 branch
BranchTrueFalseTotal
if (value) (*(int *)ud)++; 51 0 51
36 51 return 0;
37 }
38  
39 /* `out`, when the test passes, gets the store it built: for the Perl side
40 * to read back. */
41 51 static int store_abi_selftest(pTHX_ SV **out) {
42 51 const state_store_abi *T = &STORE_ABI;
43 51 SV *st = NULL, *v, *made = NULL, *bare = NULL;
44 SV *behind[3], *ahead[2];
45 51 state_store_txn *outer = NULL, *inner = NULL;
46 51 store_st_log log = { 0, 0, 0 };
47 51 size_t taken = 9, limit = 9;
48 51 int step = 0, asked = 0, names = 0, status = 99;
49 UV id;
50  
51 51 *out = NULL;
52 51 ▶ STORE_ST(1, T->abi_version == STATE_STORE_ABI_VERSION);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(1, T->abi_version == STATE_STORE_ABI_VERSION); 0 51 51
53  
54 51 v = sv_2mortal(newSViv(1));
55 51 st = (T->store_new)(aTHX_ v);
56 51 ▶ STORE_ST(2, st && (T->is_store)(aTHX_ st));
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(2, st && (T->is_store)(aTHX_ st)); 51 0 51
STORE_ST(2, st && (T->is_store)(aTHX_ st)); 0 51 51
57 51 ▶ STORE_ST(3, !(T->is_store)(aTHX_ v) && !(T->is_store)(aTHX_ &PL_sv_undef));
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(3, !(T->is_store)(aTHX_ v) && !(T->is_store)(aTHX_ &PL_sv_undef)); 51 0 51
STORE_ST(3, !(T->is_store)(aTHX_ v) && !(T->is_store)(aTHX_ &PL_sv_undef)); 0 51 51
58 51 ▶ STORE_ST(4, SvIV((T->current)(aTHX_ st)) == 1 && (T->current)(aTHX_ v) == NULL);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(4, SvIV((T->current)(aTHX_ st)) == 1 && (T->current)(aTHX_ v) == NULL); 51 0 51
STORE_ST(4, SvIV((T->current)(aTHX_ st)) == 1 && (T->current)(aTHX_ v) == NULL); 0 51 51
59  
60 51 ▶ STORE_ST(5, (T->set)(aTHX_ st, sv_2mortal(newSViv(2))) == 1);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(5, (T->set)(aTHX_ st, sv_2mortal(newSViv(2))) == 1); 0 51 51
61 51 ▶ STORE_ST(6, (T->set)(aTHX_ st, sv_2mortal(newSVpvs("2"))) == 0);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(6, (T->set)(aTHX_ st, sv_2mortal(newSVpvs("2"))) == 0); 0 51 51
62 51 ▶ STORE_ST(7, (T->set)(aTHX_ v, v) == STATE_STORE_NOTSTORE);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(7, (T->set)(aTHX_ v, v) == STATE_STORE_NOTSTORE); 0 51 51
63 51 ▶ STORE_ST(8, (T->swap)(aTHX_ st, store_st_double, NULL) == 1 && SvIV((T->current)(aTHX_ st)) == 4);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(8, (T->swap)(aTHX_ st, store_st_double, NULL) == 1 && SvIV((T->current)(aTHX_ st)) == 4); 51 0 51
STORE_ST(8, (T->swap)(aTHX_ st, store_st_double, NULL) == 1 && SvIV((T->current)(aTHX_ st)) == 4); 0 51 51
64 51 ▶ STORE_ST(9, (T->swap)(aTHX_ st, store_st_nothing, NULL) == STATE_STORE_STOPPED);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(9, (T->swap)(aTHX_ st, store_st_nothing, NULL) == STATE_STORE_STOPPED); 0 51 51
65  
66 51 ▶ STORE_ST(10, (T->undo_count)(aTHX_ st) == 2 && (T->redo_count)(aTHX_ st) == 0);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(10, (T->undo_count)(aTHX_ st) == 2 && (T->redo_count)(aTHX_ st) == 0); 51 0 51
STORE_ST(10, (T->undo_count)(aTHX_ st) == 2 && (T->redo_count)(aTHX_ st) == 0); 0 51 51
67 51 ▶ STORE_ST(11, (T->undo)(aTHX_ st, 5, &taken) == STATE_STORE_OK && taken == 2);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(11, (T->undo)(aTHX_ st, 5, &taken) == STATE_STORE_OK && taken == 2); 51 0 51
STORE_ST(11, (T->undo)(aTHX_ st, 5, &taken) == STATE_STORE_OK && taken == 2); 0 51 51
68 51 ▶ STORE_ST(12, SvIV((T->current)(aTHX_ st)) == 1 && (T->redo_count)(aTHX_ st) == 2);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(12, SvIV((T->current)(aTHX_ st)) == 1 && (T->redo_count)(aTHX_ st) == 2); 51 0 51
STORE_ST(12, SvIV((T->current)(aTHX_ st)) == 1 && (T->redo_count)(aTHX_ st) == 2); 0 51 51
69 51 ▶ STORE_ST(13, (T->redo)(aTHX_ st, 1, &taken) == STATE_STORE_OK && taken == 1
Branch: 3 branches
BranchTrueFalseTotal
STORE_ST(13, (T->redo)(aTHX_ st, 1, &taken) == STATE_STORE_OK && taken == 1 51 0 51
STORE_ST(13, (T->redo)(aTHX_ st, 1, &taken) == STATE_STORE_OK && taken == 1 51 0 51
STORE_ST(13, (T->redo)(aTHX_ st, 1, &taken) == STATE_STORE_OK && taken == 1 0 51 51
70 && SvIV((T->current)(aTHX_ st)) == 2);
71 51 ▶ STORE_ST(14, (T->clear_history)(aTHX_ st) == STATE_STORE_OK
Branch: 3 branches
BranchTrueFalseTotal
STORE_ST(14, (T->clear_history)(aTHX_ st) == STATE_STORE_OK 51 0 51
STORE_ST(14, (T->clear_history)(aTHX_ st) == STATE_STORE_OK 51 0 51
STORE_ST(14, (T->clear_history)(aTHX_ st) == STATE_STORE_OK 0 51 51
72 && (T->undo_count)(aTHX_ st) == 0 && (T->redo_count)(aTHX_ st) == 0);
73  
74 51 ▶ STORE_ST(15, (T->history_limit)(aTHX_ st, &limit) == 0 && limit == 0);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(15, (T->history_limit)(aTHX_ st, &limit) == 0 && limit == 0); 51 0 51
STORE_ST(15, (T->history_limit)(aTHX_ st, &limit) == 0 && limit == 0); 0 51 51
75 51 ▶ STORE_ST(16, (T->set_history_limit)(aTHX_ st, 1, 3) == STATE_STORE_OK);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(16, (T->set_history_limit)(aTHX_ st, 1, 3) == STATE_STORE_OK); 0 51 51
76 51 ▶ STORE_ST(17, (T->history_limit)(aTHX_ st, &limit) == 1 && limit == 3);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(17, (T->history_limit)(aTHX_ st, &limit) == 1 && limit == 3); 51 0 51
STORE_ST(17, (T->history_limit)(aTHX_ st, &limit) == 1 && limit == 3); 0 51 51
77  
78 51 id = (T->watch)(aTHX_ st, store_st_watch, &log);
79 51 ▶ STORE_ST(18, id != 0 && (T->watchers)(aTHX_ st) == 1);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(18, id != 0 && (T->watchers)(aTHX_ st) == 1); 51 0 51
STORE_ST(18, id != 0 && (T->watchers)(aTHX_ st) == 1); 0 51 51
80 51 (T->set)(aTHX_ st, sv_2mortal(newSViv(7)));
81 51 ▶ STORE_ST(19, log.calls == 1 && log.last_was == 2 && log.last_now == 7);
Branch: 3 branches
BranchTrueFalseTotal
STORE_ST(19, log.calls == 1 && log.last_was == 2 && log.last_now == 7); 51 0 51
STORE_ST(19, log.calls == 1 && log.last_was == 2 && log.last_now == 7); 51 0 51
STORE_ST(19, log.calls == 1 && log.last_was == 2 && log.last_now == 7); 0 51 51
82  
83 51 ▶ STORE_ST(20, (T->set_validator)(aTHX_ st, store_st_below_100, &asked) == STATE_STORE_OK);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(20, (T->set_validator)(aTHX_ st, store_st_below_100, &asked) == STATE_STORE_OK); 0 51 51
84 51 ▶ STORE_ST(21, (T->set)(aTHX_ st, sv_2mortal(newSViv(500))) == STATE_STORE_REFUSED
Branch: 4 branches
BranchTrueFalseTotal
STORE_ST(21, (T->set)(aTHX_ st, sv_2mortal(newSViv(500))) == STATE_STORE_REFUSED 51 0 51
STORE_ST(21, (T->set)(aTHX_ st, sv_2mortal(newSViv(500))) == STATE_STORE_REFUSED 51 0 51
STORE_ST(21, (T->set)(aTHX_ st, sv_2mortal(newSViv(500))) == STATE_STORE_REFUSED 51 0 51
STORE_ST(21, (T->set)(aTHX_ st, sv_2mortal(newSViv(500))) == STATE_STORE_REFUSED 0 51 51
85 && SvIV((T->current)(aTHX_ st)) == 7 && asked == 1 && log.calls == 1);
86 51 ▶ STORE_ST(22, (T->set)(aTHX_ st, sv_2mortal(newSViv(8))) == 1 && asked == 2);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(22, (T->set)(aTHX_ st, sv_2mortal(newSViv(8))) == 1 && asked == 2); 51 0 51
STORE_ST(22, (T->set)(aTHX_ st, sv_2mortal(newSViv(8))) == 1 && asked == 2); 0 51 51
87  
88 51 outer = (T->txn_begin)(aTHX_ st, &status);
89 51 ▶ STORE_ST(23, outer && status == STATE_STORE_OK && (T->in_txn)(aTHX_ st) == 1);
Branch: 3 branches
BranchTrueFalseTotal
STORE_ST(23, outer && status == STATE_STORE_OK && (T->in_txn)(aTHX_ st) == 1); 51 0 51
STORE_ST(23, outer && status == STATE_STORE_OK && (T->in_txn)(aTHX_ st) == 1); 51 0 51
STORE_ST(23, outer && status == STATE_STORE_OK && (T->in_txn)(aTHX_ st) == 1); 0 51 51
90 51 inner = (T->txn_begin)(aTHX_ st, NULL);
91 51 ▶ STORE_ST(24, inner != NULL);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(24, inner != NULL); 0 51 51
92 51 ▶ STORE_ST(25, (T->txn_commit)(aTHX_ outer) == STATE_STORE_ORDER);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(25, (T->txn_commit)(aTHX_ outer) == STATE_STORE_ORDER); 0 51 51
93 51 ▶ STORE_ST(26, (T->undo)(aTHX_ st, 1, NULL) == STATE_STORE_BUSY);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(26, (T->undo)(aTHX_ st, 1, NULL) == STATE_STORE_BUSY); 0 51 51
94 51 (T->set)(aTHX_ st, sv_2mortal(newSViv(30)));
95 51 ▶ STORE_ST(27, (T->txn_abort)(aTHX_ inner) == STATE_STORE_OK && SvIV((T->current)(aTHX_ st)) == 8);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(27, (T->txn_abort)(aTHX_ inner) == STATE_STORE_OK && SvIV((T->current)(aTHX_ st)) == 8); 51 0 51
STORE_ST(27, (T->txn_abort)(aTHX_ inner) == STATE_STORE_OK && SvIV((T->current)(aTHX_ st)) == 8); 0 51 51
96 51 inner = NULL;
97 51 (T->set)(aTHX_ st, sv_2mortal(newSViv(40)));
98 51 (T->set)(aTHX_ st, sv_2mortal(newSViv(41)));
99 51 ▶ STORE_ST(28, log.calls == 2);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(28, log.calls == 2); 0 51 51
100 51 ▶ STORE_ST(29, (T->txn_commit)(aTHX_ outer) == STATE_STORE_OK);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(29, (T->txn_commit)(aTHX_ outer) == STATE_STORE_OK); 0 51 51
101 51 outer = NULL;
102 51 ▶ STORE_ST(30, log.calls == 3 && log.last_was == 8 && log.last_now == 41
Branch: 4 branches
BranchTrueFalseTotal
STORE_ST(30, log.calls == 3 && log.last_was == 8 && log.last_now == 41 51 0 51
STORE_ST(30, log.calls == 3 && log.last_was == 8 && log.last_now == 41 51 0 51
STORE_ST(30, log.calls == 3 && log.last_was == 8 && log.last_now == 41 51 0 51
STORE_ST(30, log.calls == 3 && log.last_was == 8 && log.last_now == 41 0 51 51
103 && (T->in_txn)(aTHX_ st) == 0);
104  
105 51 ▶ STORE_ST(31, (T->checkpoint)(aTHX_ st, "here", 4, 0) == STATE_STORE_OK);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(31, (T->checkpoint)(aTHX_ st, "here", 4, 0) == STATE_STORE_OK); 0 51 51
106 51 ▶ STORE_ST(32, (T->has_checkpoint)(aTHX_ st, "here", 4, 0) == 1
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(32, (T->has_checkpoint)(aTHX_ st, "here", 4, 0) == 1 51 0 51
STORE_ST(32, (T->has_checkpoint)(aTHX_ st, "here", 4, 0) == 1 0 51 51
107 && (T->has_checkpoint)(aTHX_ st, "there", 5, 0) == 0);
108 51 ▶ STORE_ST(33, SvIV((T->checkpoint_value)(aTHX_ st, "here", 4, 0)) == 41);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(33, SvIV((T->checkpoint_value)(aTHX_ st, "here", 4, 0)) == 41); 0 51 51
109 51 (T->set)(aTHX_ st, sv_2mortal(newSViv(50)));
110 51 ▶ STORE_ST(34, (T->restore)(aTHX_ st, "here", 4, 0) == 1 && SvIV((T->current)(aTHX_ st)) == 41);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(34, (T->restore)(aTHX_ st, "here", 4, 0) == 1 && SvIV((T->current)(aTHX_ st)) == 41); 51 0 51
STORE_ST(34, (T->restore)(aTHX_ st, "here", 4, 0) == 1 && SvIV((T->current)(aTHX_ st)) == 41); 0 51 51
111 51 ▶ STORE_ST(35, (T->restore)(aTHX_ st, "there", 5, 0) == STATE_STORE_NOTFOUND);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(35, (T->restore)(aTHX_ st, "there", 5, 0) == STATE_STORE_NOTFOUND); 0 51 51
112 51 ▶ STORE_ST(36, (T->checkpoint_count)(aTHX_ st) == 1);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(36, (T->checkpoint_count)(aTHX_ st) == 1); 0 51 51
113 51 ▶ STORE_ST(37, (T->checkpoint_walk)(aTHX_ st, store_st_count_names, &names) == STATE_STORE_OK
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(37, (T->checkpoint_walk)(aTHX_ st, store_st_count_names, &names) == STATE_STORE_OK 51 0 51
STORE_ST(37, (T->checkpoint_walk)(aTHX_ st, store_st_count_names, &names) == STATE_STORE_OK 0 51 51
114 && names == 1);
115 51 ▶ STORE_ST(38, (T->drop_checkpoint)(aTHX_ st, "here", 4, 0) == STATE_STORE_OK
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(38, (T->drop_checkpoint)(aTHX_ st, "here", 4, 0) == STATE_STORE_OK 51 0 51
STORE_ST(38, (T->drop_checkpoint)(aTHX_ st, "here", 4, 0) == STATE_STORE_OK 0 51 51
116 && (T->checkpoint_count)(aTHX_ st) == 0);
117 51 ▶ STORE_ST(39, (T->drop_checkpoint)(aTHX_ st, "here", 4, 0) == STATE_STORE_NOTFOUND);
Branch: 1 branch
BranchTrueFalseTotal
STORE_ST(39, (T->drop_checkpoint)(aTHX_ st, "here", 4, 0) == STATE_STORE_NOTFOUND); 0 51 51
118  
119 51 ▶ STORE_ST(40, (T->unwatch)(aTHX_ st, id) == 1 && (T->watchers)(aTHX_ st) == 0
Branch: 3 branches
BranchTrueFalseTotal
STORE_ST(40, (T->unwatch)(aTHX_ st, id) == 1 && (T->watchers)(aTHX_ st) == 0 51 0 51
STORE_ST(40, (T->unwatch)(aTHX_ st, id) == 1 && (T->watchers)(aTHX_ st) == 0 51 0 51
STORE_ST(40, (T->unwatch)(aTHX_ st, id) == 1 && (T->watchers)(aTHX_ st) == 0 0 51 51
120 && (T->unwatch)(aTHX_ st, id) == 0);
121 51 ▶ STORE_ST(41, (T->set_validator)(aTHX_ st, NULL, NULL) == STATE_STORE_OK
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(41, (T->set_validator)(aTHX_ st, NULL, NULL) == STATE_STORE_OK 51 0 51
STORE_ST(41, (T->set_validator)(aTHX_ st, NULL, NULL) == STATE_STORE_OK 0 51 51
122 && (T->set)(aTHX_ st, sv_2mortal(newSViv(1000))) == 1);
123  
124 /* version 2: a store made with a history, and read back */
125 51 behind[0] = sv_2mortal(newSViv(1));
126 51 behind[1] = NULL;
127 51 behind[2] = sv_2mortal(newSViv(3));
128 51 ahead[0] = sv_2mortal(newSViv(5));
129 51 ahead[1] = sv_2mortal(newSViv(6));
130 51 made = (T->store_new_with_history)(aTHX_ sv_2mortal(newSViv(4)), behind, 3, ahead, 2);
131 51 ▶ STORE_ST(42, made && (T->is_store)(aTHX_ made) && SvIV((T->current)(aTHX_ made)) == 4
Branch: 5 branches
BranchTrueFalseTotal
STORE_ST(42, made && (T->is_store)(aTHX_ made) && SvIV((T->current)(aTHX_ made)) == 4 51 0 51
STORE_ST(42, made && (T->is_store)(aTHX_ made) && SvIV((T->current)(aTHX_ made)) == 4 51 0 51
STORE_ST(42, made && (T->is_store)(aTHX_ made) && SvIV((T->current)(aTHX_ made)) == 4 51 0 51
STORE_ST(42, made && (T->is_store)(aTHX_ made) && SvIV((T->current)(aTHX_ made)) == 4 51 0 51
STORE_ST(42, made && (T->is_store)(aTHX_ made) && SvIV((T->current)(aTHX_ made)) == 4 0 51 51
132 && (T->undo_count)(aTHX_ made) == 3 && (T->redo_count)(aTHX_ made) == 2);
133 51 ▶ STORE_ST(43, SvIV((T->past_value)(aTHX_ made, 0)) == 1
Branch: 4 branches
BranchTrueFalseTotal
STORE_ST(43, SvIV((T->past_value)(aTHX_ made, 0)) == 1 51 0 51
STORE_ST(43, SvIV((T->past_value)(aTHX_ made, 0)) == 1 51 0 51
STORE_ST(43, SvIV((T->past_value)(aTHX_ made, 0)) == 1 51 0 51
STORE_ST(43, SvIV((T->past_value)(aTHX_ made, 0)) == 1 0 51 51
134 && !SvOK((T->past_value)(aTHX_ made, 1))
135 && SvIV((T->past_value)(aTHX_ made, 2)) == 3
136 && (T->past_value)(aTHX_ made, 3) == NULL);
137 51 ▶ STORE_ST(44, SvIV((T->future_value)(aTHX_ made, 0)) == 5
Branch: 3 branches
BranchTrueFalseTotal
STORE_ST(44, SvIV((T->future_value)(aTHX_ made, 0)) == 5 51 0 51
STORE_ST(44, SvIV((T->future_value)(aTHX_ made, 0)) == 5 51 0 51
STORE_ST(44, SvIV((T->future_value)(aTHX_ made, 0)) == 5 0 51 51
138 && SvIV((T->future_value)(aTHX_ made, 1)) == 6
139 && (T->future_value)(aTHX_ made, 2) == NULL);
140 51 ▶ STORE_ST(45, (T->undo)(aTHX_ made, 1, &taken) == STATE_STORE_OK && taken == 1
Branch: 5 branches
BranchTrueFalseTotal
STORE_ST(45, (T->undo)(aTHX_ made, 1, &taken) == STATE_STORE_OK && taken == 1 51 0 51
STORE_ST(45, (T->undo)(aTHX_ made, 1, &taken) == STATE_STORE_OK && taken == 1 51 0 51
STORE_ST(45, (T->undo)(aTHX_ made, 1, &taken) == STATE_STORE_OK && taken == 1 51 0 51
STORE_ST(45, (T->undo)(aTHX_ made, 1, &taken) == STATE_STORE_OK && taken == 1 51 0 51
STORE_ST(45, (T->undo)(aTHX_ made, 1, &taken) == STATE_STORE_OK && taken == 1 0 51 51
141 && SvIV((T->current)(aTHX_ made)) == 3
142 && SvIV((T->future_value)(aTHX_ made, 0)) == 4
143 && (T->undo_count)(aTHX_ made) == 2);
144 51 ▶ STORE_ST(46, (T->past_value)(aTHX_ v, 0) == NULL && (T->future_value)(aTHX_ v, 0) == NULL);
Branch: 2 branches
BranchTrueFalseTotal
STORE_ST(46, (T->past_value)(aTHX_ v, 0) == NULL && (T->future_value)(aTHX_ v, 0) == NULL); 51 0 51
STORE_ST(46, (T->past_value)(aTHX_ v, 0) == NULL && (T->future_value)(aTHX_ v, 0) == NULL); 0 51 51
145 51 bare = (T->store_new_with_history)(aTHX_ NULL, NULL, 0, NULL, 0);
146 51 ▶ STORE_ST(47, bare && !SvOK((T->current)(aTHX_ bare))
Branch: 4 branches
BranchTrueFalseTotal
STORE_ST(47, bare && !SvOK((T->current)(aTHX_ bare)) 51 0 51
STORE_ST(47, bare && !SvOK((T->current)(aTHX_ bare)) 51 0 51
STORE_ST(47, bare && !SvOK((T->current)(aTHX_ bare)) 51 0 51
STORE_ST(47, bare && !SvOK((T->current)(aTHX_ bare)) 51 0 51
147 && (T->undo_count)(aTHX_ bare) == 0 && (T->redo_count)(aTHX_ bare) == 0);
148  
149 51 done:
150 51 ▶ if (made) SvREFCNT_dec(made);
Branch: 1 branch
BranchTrueFalseTotal
if (made) SvREFCNT_dec(made); 51 0 51
151 51 ▶ if (bare) SvREFCNT_dec(bare);
Branch: 1 branch
BranchTrueFalseTotal
if (bare) SvREFCNT_dec(bare); 51 0 51
152 51 ▶ if (inner) (T->txn_abort)(aTHX_ inner);
Branch: 1 branch
BranchTrueFalseTotal
if (inner) (T->txn_abort)(aTHX_ inner); 0 51 51
153 51 ▶ if (outer) (T->txn_abort)(aTHX_ outer);
Branch: 1 branch
BranchTrueFalseTotal
if (outer) (T->txn_abort)(aTHX_ outer); 0 51 51
154 51 ▶ if (st) {
Branch: 1 branch
BranchTrueFalseTotal
if (st) { 51 0 51
155 51 ▶ if (step) SvREFCNT_dec(st);
Branch: 1 branch
BranchTrueFalseTotal
if (step) SvREFCNT_dec(st); 0 51 51
156 51 else *out = st;
157 }
158 51 return step;
159 }
160  
161 #endif
« blib/arch/State/Store/Install/Files.pm ↑ Summary xs/abi.xs »