-
Notifications
You must be signed in to change notification settings - Fork 9
/
SPECS.txt
103 lines (86 loc) · 3.2 KB
/
SPECS.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
== Timecode.new should
* instantiate from int
* always coerce FPS to float
* create a zero TC with no arguments
* accept full string SMPTE timecode as well
== Timecode.validate_atoms! should
* disallow more than 99 hrs
* disallow more than 59 minutes
* disallow more than 59 seconds
* disallow more frames than what the framerate permits
* pass validation with usable values
== Timecode.at should
* disallow more than 99 hrs
* disallow more than 59 minutes
* disallow more than 59 seconds
* disallow more frames than what the framerate permits
* propery accept usable values
== A new Timecode object should
* be frozen
== An existing Timecode should
* report that the framerates are in delta
* validate equality based on delta
* report total as it's to_i
* support hours
* support minutes
* support seconds
* support frames
* report frame_interval as a float
* be comparable
* raise on comparison of incompatible timecodes
== A Timecode of zero should
* properly respond to zero?
== Timecode#to_seconds should
* return a float
* return the value in seconds
* properly roundtrip a value via Timecode.from_seconds
== An existing Timecode on inspection should
* properly present himself via inspect
* properly print itself
== An existing Timecode used within ranges should
* properly provide successive value that is one frame up
* work as a range member
== A Timecode on conversion should
* copy itself with a different framerate
== A Timecode on calculations should
* support addition
* should raise on addition if framerates do not match
* when added with an integer instead calculate on total
* support subtraction
* on subtraction of an integer instead calculate on total
* raise when subtracting a Timecode with a different framerate
* support multiplication
* raise when the resultig Timecode is negative
* return a Timecode when divided by an Integer
* return a number when divided by another Timecode
== A Timecode used with fractional number of seconds
* should properly return fractional seconds
* properly translate to frames when instantiated from fractional seconds
== A custom Timecode descendant should
* properly classify on parse
* properly classify on at
* properly classify on calculations
== Timecode.parse should
* handle complete SMPTE timecode
* handle timecode with fractional seconds
* parse a row of numbers as parts of a timecode starting from the right
* parse a number with f suffix as frames
* parse a number with s suffix as seconds
* parse a number with m suffix as minutes
* parse a number with h suffix as hours
* parse different suffixes as a sum of elements
* parse a number of digits as timecode
* truncate a large number to the parseable length
* left-pad a large number to give proper TC
* parse timecode with fractional second instead of frames
* raise when trying to parse DF timecode
* raise on improper format
* raise on empty argument
* properly handle 09 and 08 as part of complete TC pattern
== Timecode.soft_parse should
* parse the timecode
* not raise on improper format and return zero TC instead
== Timecode with unsigned integer conversions should
* parse from a 4x4bits packed 32bit unsigned int
* properly convert itself back to 4x4 bits 32bit unsigned int
69 specifications (113 requirements), 0 failures