Skip to content

Commit c692d39

Browse files
committed
[css-color-4] Split tests into multiple categories
1 parent f80a0dc commit c692d39

1 file changed

Lines changed: 39 additions & 6 deletions

File tree

css-color-4/tests.html

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,28 +49,61 @@
4949
<h1>Color Conversion Tests</h1>
5050

5151
<section>
52-
<h1>sRGB_to_LCH</h1>
52+
<h1>sRGB to LCH</h1>
5353
<table class="reftest">
5454
<tbody>
5555
<script>
56-
57-
5856
for (let test of tests) {
5957
reftest(`sRGB ${test.RGB} to LCH`, sRGB_to_LCH, [test.RGB], test.LCH);
58+
}
59+
</script>
60+
</tbody>
61+
</table>
62+
</section>
63+
64+
<section>
65+
<h1>sRGB to XYZ</h1>
66+
<table class="reftest">
67+
<tbody>
68+
<script>
69+
for (let test of tests) {
6070
reftest(`sRGB ${test.RGB} to XYZ`, a => lin_sRGB_to_XYZ(lin_sRGB(a)), [test.RGB], test.XYZ);
6171
reftest(`P3 ${test.RGB} to LCH`, P3_to_LCH, [test.RGB], test.P3_to_LCH);
6272
reftest(`P3 ${test.RGB} to XYZ`, a => lin_P3_to_XYZ(lin_P3(a)), [test.RGB], test.P3_to_XYZ);
6373
}
6474
</script>
65-
<!-- <script>
66-
reftest("sRGB 0,0,0 to LCH", sRGB_to_LCH, [[0, 0, 0]], [0, 0, 0])
67-
</script> -->
6875
</tbody>
76+
</table>
77+
</section>
6978

79+
<section>
80+
<h1>P3 to LCH</h1>
81+
<table class="reftest">
82+
<tbody>
83+
<script>
84+
for (let test of tests) {
85+
reftest(`P3 ${test.RGB} to LCH`, P3_to_LCH, [test.RGB], test.P3_to_LCH);
86+
}
87+
</script>
88+
</tbody>
89+
</table>
90+
</section>
7091

92+
<section>
93+
<h1>P3 to XYZ</h1>
94+
<table class="reftest">
95+
<tbody>
96+
<script>
97+
for (let test of tests) {
98+
reftest(`P3 ${test.RGB} to XYZ`, a => lin_P3_to_XYZ(lin_P3(a)), [test.RGB], test.P3_to_XYZ);
99+
}
100+
</script>
101+
</tbody>
71102
</table>
72103
</section>
73104

74105

106+
107+
75108
</body>
76109
</html>

0 commit comments

Comments
 (0)