Branch Coverage

xs/DateRel.xsi
Criterion Covered Total %
branch 155 292 53.0


line true false branch
19 47 0 Stash stash("Date::Rel", GV_ADD);
21 47 0 xs::exp::create_constants(stash, {
47 0 xs::exp::create_constants(stash, {
47 0 xs::exp::create_constants(stash, {
47 0 xs::exp::create_constants(stash, {
47 0 xs::exp::create_constants(stash, {
47 0 xs::exp::create_constants(stash, {
47 0 xs::exp::create_constants(stash, {
47 0 xs::exp::create_constants(stash, {
47 0 xs::exp::create_constants(stash, {
376 47 xs::exp::create_constants(stash, {
0 0 xs::exp::create_constants(stash, {
31 47 0 });
38 35 1 }
35 0 }
35 0 }
42 4 0 }
4 0 }
4 0 }
46 330 0 }
330 0 }
330 0 }
50 0 0 }
0 0 }
0 0 }
58 24 1 }
24 0 }
24 0 }
62 4 0 }
4 0 }
4 0 }
65 3 0 *THIS = xs_daterel_ctor(from, till);
69 2 0 *THIS = xs_daterel_ymd(&ST(1), items - 1);
76 0 13 THIS->sec(xs::in(newval));
77 0 0 }
83 0 13 RETVAL = THIS->min();
0 0 RETVAL = THIS->min();
88 0 13 THIS->hour(xs::in(newval));
89 0 0 }
95 0 10 THIS->day(xs::in(newval));
96 0 0 }
102 0 11 THIS->month(xs::in(newval));
103 0 0 }
109 1 11 THIS->year(xs::in(newval));
110 1 0 }
116 2 4 THIS->from(sv2date(fromSV));
117 2 0 XSRETURN_UNDEF;
2 0 XSRETURN_UNDEF;
120 0 4 RETVAL = new Date(*(THIS->from()));
121 4 0 }
4 0 }
125 2 0 if (!till) XSRETURN_UNDEF;
2 0 if (!till) XSRETURN_UNDEF;
126 0 2 RETVAL = new Date(*till);
127 2 0 }
2 0 }
132 21 0 }
134 4 0 double DateRel::to_mins () : const
136 2 0 double DateRel::to_hours () : const
138 2 0 double DateRel::to_days () : const
140 2 0 double DateRel::to_months () : const
142 2 0 double DateRel::to_years () : const
145 53 0 RETVAL = THIS->to_string((DateRel::Format)format);
53 0 RETVAL = THIS->to_string((DateRel::Format)format);
149 5 0 RETVAL = THIS->to_string();
5 0 RETVAL = THIS->to_string();
153 0 0 RETVAL = THIS->duration();
158 3 0 }
161 14 6 if (arg.is_object_ref()) {
162 14 0 Stash s = Object(arg).stash();
14 0 Stash s = Object(arg).stash();
163 14 0 if (s.name() == "Date") RETVAL = xs::out(new Date(*xs::in(arg) + *THIS));
1 13 if (s.name() == "Date") RETVAL = xs::out(new Date(*xs::in(arg) + *THIS));
1 0 if (s.name() == "Date") RETVAL = xs::out(new Date(*xs::in(arg) + *THIS));
1 0 if (s.name() == "Date") RETVAL = xs::out(new Date(*xs::in(arg) + *THIS));
1 0 if (s.name() == "Date") RETVAL = xs::out(new Date(*xs::in(arg) + *THIS));
1 0 if (s.name() == "Date") RETVAL = xs::out(new Date(*xs::in(arg) + *THIS));
1 0 if (s.name() == "Date") RETVAL = xs::out(new Date(*xs::in(arg) + *THIS));
164 13 0 else RETVAL = xs::out(new DateRel(*THIS + *xs::in(arg)), Object(ST(0)).stash());
13 0 else RETVAL = xs::out(new DateRel(*THIS + *xs::in(arg)), Object(ST(0)).stash());
13 0 else RETVAL = xs::out(new DateRel(*THIS + *xs::in(arg)), Object(ST(0)).stash());
13 0 else RETVAL = xs::out(new DateRel(*THIS + *xs::in(arg)), Object(ST(0)).stash());
13 0 else RETVAL = xs::out(new DateRel(*THIS + *xs::in(arg)), Object(ST(0)).stash());
13 0 else RETVAL = xs::out(new DateRel(*THIS + *xs::in(arg)), Object(ST(0)).stash());
13 0 else RETVAL = xs::out(new DateRel(*THIS + *xs::in(arg)), Object(ST(0)).stash());
166 6 0 else RETVAL = xs::out(new DateRel(*THIS + sv2daterel(arg)), Object(ST(0)).stash());
6 0 else RETVAL = xs::out(new DateRel(*THIS + sv2daterel(arg)), Object(ST(0)).stash());
6 0 else RETVAL = xs::out(new DateRel(*THIS + sv2daterel(arg)), Object(ST(0)).stash());
6 0 else RETVAL = xs::out(new DateRel(*THIS + sv2daterel(arg)), Object(ST(0)).stash());
6 0 else RETVAL = xs::out(new DateRel(*THIS + sv2daterel(arg)), Object(ST(0)).stash());
6 0 else RETVAL = xs::out(new DateRel(*THIS + sv2daterel(arg)), Object(ST(0)).stash());
6 0 else RETVAL = xs::out(new DateRel(*THIS + sv2daterel(arg)), Object(ST(0)).stash());
170 4 1 *THIS += sv2daterel(arg);
4 0 *THIS += sv2daterel(arg);
171 0 4 XSRETURN(1);
176 10 2 RETVAL = new DateRel(reverse ? (op - *THIS) : (*THIS - op));
177 10 0 PROTO = Object(ST(0)).stash();
5 5 PROTO = Object(ST(0)).stash();
5 0 PROTO = Object(ST(0)).stash();
5 0 PROTO = Object(ST(0)).stash();
0 0 PROTO = Object(ST(0)).stash();
178 10 0 }
10 0 }
181 6 2 *THIS -= sv2daterel(arg);
6 0 *THIS -= sv2daterel(arg);
182 0 6 XSRETURN(1);
187 6 17 PROTO = Object(ST(0)).stash();
17 0 PROTO = Object(ST(0)).stash();
23 0 PROTO = Object(ST(0)).stash();
23 0 PROTO = Object(ST(0)).stash();
23 0 PROTO = Object(ST(0)).stash();
188 23 0 }
23 0 }
191 1 1 *THIS *= SvNV(arg);
1 0 *THIS *= SvNV(arg);
2 0 *THIS *= SvNV(arg);
197 6 9 RETVAL = new DateRel(*THIS / SvNV(arg));
198 0 9 PROTO = Object(ST(0)).stash();
9 0 PROTO = Object(ST(0)).stash();
9 0 PROTO = Object(ST(0)).stash();
9 0 PROTO = Object(ST(0)).stash();
9 0 PROTO = Object(ST(0)).stash();
199 9 0 }
9 0 }
202 0 2 if (reverse) throw "Date: illegal divison $num/$reldate";
203 1 1 *THIS /= SvNV(arg);
1 0 *THIS /= SvNV(arg);
2 0 *THIS /= SvNV(arg);
209 2 0 PROTO = Object(ST(0)).stash();
2 0 PROTO = Object(ST(0)).stash();
2 0 PROTO = Object(ST(0)).stash();
210 2 0 }
2 0 }
218 25 1 RETVAL = THIS->compare(sv2daterel(arg));
25 0 RETVAL = THIS->compare(sv2daterel(arg));
219 2 23 if (reverse) RETVAL = -RETVAL;
220 5 20 if (RETVAL < 0) RETVAL = -1;
221 5 15 else if (RETVAL > 0) RETVAL = 1;
225 91 1 RETVAL = THIS->is_same(sv2daterel(arg));
91 0 RETVAL = THIS->is_same(sv2daterel(arg));
229 6 0 RETVAL = THIS->includes(sv2date(arg));
6 0 RETVAL = THIS->includes(sv2date(arg));
234 2 0 PROTO = Object(ST(0)).stash();
2 0 PROTO = Object(ST(0)).stash();
235 2 0 }
2 0 }