Skip to content

Commit

Permalink
Exhaustive set of computed time permutations
Browse files Browse the repository at this point in the history
Text file listing permutations of begin and end times being
absent/present for 1 parent and 1 child and 1 parent and 2 children, to
check that the computed active times of the parent and each child in a
single document are correct.

Needs to be turned into a proper test, including making the elements
not just generic “parent” and “child” but actual legal elements like
div and p, or p and span etc…
  • Loading branch information
nigelmegitt committed Aug 9, 2016
1 parent 0c355ae commit 9729f2c
Showing 1 changed file with 96 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
Testing computed element active begin and end times

Assuming that parent end = min(explicit end, begin+dur) where dur may exist, i.e. for body element.

Given a parent element with one child element, the computed active parent and child begin and active parent end times are valid:

Permutations:

| parent begin | parent end | child 1 begin | child 1 end | active parent begin | active parent end | active c 1 begin | active c 1 end
| | | | | 00:00:00 | undefined | 00:00:00 | undefined
| 00:01:00 | | | | 00:01:00 | undefined | 00:01:00 | undefined
| | 00:01:30 | | | 00:00:00 | 00:01:30 | 00:00:00 | 00:01:30
| 00:01:00 | 00:01:30 | | | 00:01:00 | 00:01:30 | 00:01:00 | 00:01:30
| | | 00:01:08 | | 00:00:00 | undefined | 00:01:08 | undefined
| 00:01:00 | | 00:00:08 | | 00:01:00 | undefined | 00:01:08 | undefined
| | 00:01:30 | 00:01:08 | | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:30
| 00:01:00 | 00:01:30 | 00:00:08 | | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:30
| | | 00:01:08 | 00:01:20 | 00:00:00 | 00:01:20 | 00:01:08 | 00:01:20
| 00:01:00 | | 00:00:08 | 00:00:20 | 00:01:00 | 00:01:20 | 00:01:08 | 00:01:20
| | 00:01:30 | 00:01:08 | 00:01:20 | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:20
| 00:01:00 | 00:01:30 | 00:00:08 | 00:00:20 | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:20
| | | | 00:01:20 | 00:00:00 | 00:01:20 | 00:00:00 | 00:01:20
| 00:01:00 | | | 00:00:20 | 00:01:00 | 00:01:20 | 00:01:00 | 00:01:20
| | 00:01:30 | | 00:01:20 | 00:00:00 | 00:01:30 | 00:01:00 | 00:01:20
| 00:01:00 | 00:01:30 | | 00:00:20 | 00:01:00 | 00:01:30 | 00:01:00 | 00:01:20

Given a parent element with two child elements, the computed active parent and child begin and active parent end times are valid:

Permutations:

| parent begin | parent end | child 1 begin | child 1 end | child 2 begin | child 2 end | active parent begin | active parent end | active c 1 begin | active c 1 end | active c 2 begin | active c 2 end
| | | | | | | 00:00:00 | undefined | 00:00:00 | undefined | 00:00:00 | undefined
| 00:01:00 | | | | | | 00:01:00 | undefined | 00:01:00 | undefined | 00:01:00 | undefined
| | 00:01:30 | | | | | 00:00:00 | 00:01:30 | 00:00:00 | 00:01:30 | 00:00:00 | 00:01:30
| 00:01:00 | 00:01:30 | | | | | 00:01:00 | 00:01:30 | 00:01:00 | 00:01:30 | 00:01:00 | 00:01:30
| | | 00:01:08 | | | | 00:00:00 | undefined | 00:01:08 | undefined | 00:00:00 | undefined
| 00:01:00 | | 00:00:08 | | | | 00:01:00 | undefined | 00:01:08 | undefined | 00:01:00 | undefined
| | 00:01:30 | 00:01:08 | | | | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:30 | 00:00:00 | 00:01:30
| 00:01:00 | 00:01:30 | 00:00:08 | | | | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:30 | 00:01:00 | 00:01:30
| | | 00:01:08 | 00:01:20 | | | 00:00:00 | undefined | 00:01:08 | 00:01:20 | 00:00:00 | undefined
| 00:01:00 | | 00:00:08 | 00:00:20 | | | 00:01:00 | undefined | 00:01:08 | 00:01:20 | 00:01:00 | undefined
| | 00:01:30 | 00:01:08 | 00:01:20 | | | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:00:00 | 00:01:30
| 00:01:00 | 00:01:30 | 00:00:08 | 00:00:20 | | | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:00 | 00:01:30
| | | | 00:01:20 | | | 00:00:00 | undefined | 00:01:08 | 00:01:20 | 00:00:00 | undefined
| 00:01:00 | | | 00:00:20 | | | 00:01:00 | undefined | 00:01:08 | 00:01:20 | 00:01:00 | undefined
| | 00:01:30 | | 00:01:20 | | | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:00:00 | 00:01:30
| 00:01:00 | 00:01:30 | | 00:00:20 | | | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:00 | 00:01:30
| | | | | 00:01:15 | | 00:00:00 | undefined | 00:00:00 | undefined | 00:01:15 | undefined
| 00:01:00 | | | | 00:00:15 | | 00:01:00 | undefined | 00:01:00 | undefined | 00:01:15 | undefined
| | 00:01:30 | | | 00:01:15 | | 00:00:00 | 00:01:30 | 00:00:00 | 00:01:30 | 00:01:15 | 00:01:30
| 00:01:00 | 00:01:30 | | | 00:00:15 | | 00:01:00 | 00:01:30 | 00:01:00 | 00:01:30 | 00:01:15 | 00:01:30
| | | 00:01:08 | | 00:01:15 | | 00:00:00 | undefined | 00:01:08 | undefined | 00:01:15 | undefined
| 00:01:00 | | 00:00:08 | | 00:00:15 | | 00:01:00 | undefined | 00:01:08 | undefined | 00:01:15 | undefined
| | 00:01:30 | 00:01:08 | | 00:01:15 | | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:30 | 00:01:15 | 00:01:30
| 00:01:00 | 00:01:30 | 00:00:08 | | 00:00:15 | | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:30 | 00:01:15 | 00:01:30
| | | 00:01:08 | 00:01:20 | 00:01:15 | | 00:00:00 | undefined | 00:01:08 | 00:01:20 | 00:01:15 | undefined
| 00:01:00 | | 00:00:08 | 00:00:20 | 00:00:15 | | 00:01:00 | undefined | 00:01:08 | 00:01:20 | 00:01:15 | undefined
| | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:15 | | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:30
| 00:01:00 | 00:01:30 | 00:00:08 | 00:00:20 | 00:00:15 | | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:30
| | | | 00:01:20 | 00:01:15 | | 00:00:00 | undefined | 00:01:08 | 00:01:20 | 00:01:15 | undefined
| 00:01:00 | | | 00:00:20 | 00:00:15 | | 00:01:00 | undefined | 00:01:08 | 00:01:20 | 00:01:15 | undefined
| | 00:01:30 | | 00:01:20 | 00:01:15 | | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:30
| 00:01:00 | 00:01:30 | | 00:00:20 | 00:00:15 | | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:30
| | | | | | 00:01:35 | 00:00:00 | undefined | 00:00:00 | undefined | 00:00:00 | 00:01:35
| 00:01:00 | | | | | 00:00:35 | 00:01:00 | undefined | 00:01:00 | undefined | 00:01:00 | 00:01:35
| | 00:01:30 | | | | 00:01:35 | 00:00:00 | 00:01:30 | 00:00:00 | 00:01:30 | 00:00:00 | 00:01:30
| 00:01:00 | 00:01:30 | | | | 00:00:35 | 00:01:00 | 00:01:30 | 00:01:00 | 00:01:30 | 00:01:00 | 00:01:30
| | | 00:01:08 | | | 00:01:35 | 00:00:00 | undefined | 00:01:08 | undefined | 00:00:00 | 00:01:35
| 00:01:00 | | 00:00:08 | | | 00:00:35 | 00:01:00 | undefined | 00:01:08 | undefined | 00:01:00 | 00:01:35
| | 00:01:30 | 00:01:08 | | | 00:01:35 | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:30 | 00:00:00 | 00:01:30
| 00:01:00 | 00:01:30 | 00:00:08 | | | 00:00:35 | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:30 | 00:01:00 | 00:01:30
| | | 00:01:08 | 00:01:20 | | 00:01:35 | 00:00:00 | 00:01:35 | 00:01:08 | 00:01:20 | 00:00:00 | 00:01:35
| 00:01:00 | | 00:00:08 | 00:00:20 | | 00:00:35 | 00:01:00 | 00:01:35 | 00:01:08 | 00:01:20 | 00:01:00 | 00:01:35
| | 00:01:30 | 00:01:08 | 00:01:20 | | 00:01:35 | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:00:00 | 00:01:30
| 00:01:00 | 00:01:30 | 00:00:08 | 00:00:20 | | 00:00:35 | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:00 | 00:01:30
| | | | 00:01:20 | | 00:01:35 | 00:00:00 | 00:01:35 | 00:01:08 | 00:01:20 | 00:00:00 | 00:01:35
| 00:01:00 | | | 00:00:20 | | 00:00:35 | 00:01:00 | 00:01:35 | 00:01:08 | 00:01:20 | 00:01:00 | 00:01:35
| | 00:01:30 | | 00:01:20 | | 00:01:35 | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:00:00 | 00:01:30
| 00:01:00 | 00:01:30 | | 00:00:20 | | 00:00:35 | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:00 | 00:01:30
| | | | | 00:01:15 | 00:01:35 | 00:00:00 | undefined | 00:00:00 | undefined | 00:01:15 | 00:01:35
| 00:01:00 | | | | 00:00:15 | 00:00:35 | 00:01:00 | undefined | 00:01:00 | undefined | 00:01:15 | 00:01:35
| | 00:01:30 | | | 00:01:15 | 00:01:35 | 00:00:00 | 00:01:30 | 00:00:00 | 00:01:30 | 00:01:15 | 00:01:30
| 00:01:00 | 00:01:30 | | | 00:00:15 | 00:00:35 | 00:01:00 | 00:01:30 | 00:01:00 | 00:01:30 | 00:01:15 | 00:01:30
| | | 00:01:08 | | 00:01:15 | 00:01:35 | 00:00:00 | undefined | 00:01:08 | undefined | 00:01:15 | 00:01:35
| 00:01:00 | | 00:00:08 | | 00:00:15 | 00:00:35 | 00:01:00 | undefined | 00:01:08 | undefined | 00:01:15 | 00:01:35
| | 00:01:30 | 00:01:08 | | 00:01:15 | 00:01:35 | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:30 | 00:01:15 | 00:01:30
| 00:01:00 | 00:01:30 | 00:00:08 | | 00:00:15 | 00:00:35 | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:30 | 00:01:15 | 00:01:30
| | | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:35 | 00:00:00 | 00:01:35 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:35
| 00:01:00 | | 00:00:08 | 00:00:20 | 00:00:15 | 00:00:35 | 00:01:00 | 00:01:35 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:35
| | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:35 | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:30
| 00:01:00 | 00:01:30 | 00:00:08 | 00:00:20 | 00:00:15 | 00:00:35 | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:30
| | | | 00:01:20 | 00:01:15 | 00:01:35 | 00:00:00 | undefined | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:35
| 00:01:00 | | | 00:00:20 | 00:00:15 | 00:00:35 | 00:01:00 | undefined | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:35
| | 00:01:30 | | 00:01:20 | 00:01:15 | 00:01:35 | 00:00:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:30
| 00:01:00 | 00:01:30 | | 00:00:20 | 00:00:15 | 00:00:35 | 00:01:00 | 00:01:30 | 00:01:08 | 00:01:20 | 00:01:15 | 00:01:30

0 comments on commit 9729f2c

Please sign in to comment.