aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorPaul Eggert2017-10-01 21:58:52 -0700
committerPaul Eggert2017-10-01 21:58:52 -0700
commit4829a3b033b119b088947d14b73efc197b2547fa (patch)
treeef9a96d2fa02c559ce69ff3ac9a272af84e5f6e9 /test/src
parentee3024c70d2974b59ecdd04b75d18d7258262e70 (diff)
parent5172fa02cccaab2500ecf85aaf65b8deed54d42e (diff)
downloademacs-4829a3b033b119b088947d14b73efc197b2547fa.tar.gz
emacs-4829a3b033b119b088947d14b73efc197b2547fa.zip
Merge from origin/emacs-26
5172fa02cc Prefer HTTPS to HTTP for gnu.org 8cdd8b920a Merge from Gnulib 60b7668b89 Keep eww buffer current when looking up CSS on MDN bd49b6f1b3 Workaround for faulty localtime() under macOS 10.6 913808e224 Doc amendment for syntax-ppss. 98dc91fda8 Remove incorrect NEWS entry about 'find-library' 539d8626cd Remove inadvertent changes to syntax.texi in last commit. 8c18dcbc78 Amend documentation for text-quoting-style becoming a user... 5f76ac150a Make the value nil in text-quoting-style mean what it does... d5e4e004fa Make text-quoting-style customizable. Introduce t and new... 1ba3471b9b eshell.texi improvements 7abb5c3960 Fix ns-win.el on GNUstep 07ea5ef99a Fix reference style in org.texi b03b4f6d79 Improve handling of iconification of child frames (Bug#28611) ba9139c501 Revert "Don't lose arguments to eshell aliases (Bug#27954)" 43fac3beae Make "unsafe directory" error message more informative (Bu... c59ddb2120 Fix slot typecheck in eieio-persistent 8b2ab5014b Fix semantic-ia-fast-jump 5b45e7e1c3 Bind vc-region-history f172894595 Exit macro definition on undefined keys 289fe6c0d1 Reset bidi-paragraph-direction on article rendering a4f7518817 Fix url-http use of url-current-object 4a755ed421 Avoid assertions in vc-hg.el on MS-Windows cb93a6ce72 Improve documentation of 'copy-sequence' 200ef6f721 Minor update of ack.texi cb407d3e87 * doc/emacs/emacs.texi (Acknowledgments): Add more contrib... 82b6c765ff Improve indexing of multi-file/buffer Isearch commands 645ff6c702 Add CAM02 JCh and CAM02-UCS J'a'b' conversions 157007b58e Fix uses of @kindex in the Emacs manual 63a45e8837 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e... 3ab2f9bbb9 Merge from gnulib cbc8324488 Prefer HTTPS to HTTP for gnu.org bbda601d1d ; Spelling fixes 695cf5300b Wait for frame visibility with timeout in w32term too e1f6e3127a Bring back the busy wait after x_make_frame_visible (Bug#2... bccf635217 ; * src/gtkutil.c (xg_check_special_colors): Add another G... f428757cdb Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e... 26d58f0c58 ; Standardize license notices 73dba0f466 Fix last doc string change in simple.el
Diffstat (limited to 'test/src')
-rw-r--r--test/src/lcms-tests.el44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/src/lcms-tests.el b/test/src/lcms-tests.el
index d6d1d16b9ad..cc324af68ba 100644
--- a/test/src/lcms-tests.el
+++ b/test/src/lcms-tests.el
@@ -94,6 +94,38 @@ B is considered the exact value."
94 (apply #'color-xyz-to-xyy (lcms-temp->white-point 7504)) 94 (apply #'color-xyz-to-xyy (lcms-temp->white-point 7504))
95 '(0.29902 0.31485 1.0)))) 95 '(0.29902 0.31485 1.0))))
96 96
97(ert-deftest lcms-roundtrip ()
98 "Test accuracy of converting to and from different color spaces"
99 (skip-unless (featurep 'lcms2))
100 (should
101 (let ((color '(.5 .3 .7)))
102 (lcms-triple-approx-p (lcms-jch->xyz (lcms-xyz->jch color))
103 color
104 0.0001)))
105 (should
106 (let ((color '(.8 -.2 .2)))
107 (lcms-triple-approx-p (lcms-jch->jab (lcms-jab->jch color))
108 color
109 0.0001))))
110
111(ert-deftest lcms-ciecam02-gold ()
112 "Test CIE CAM02 JCh gold values"
113 (skip-unless (featurep 'lcms2))
114 (should
115 (lcms-triple-approx-p
116 (lcms-xyz->jch '(0.1931 0.2393 0.1014)
117 '(0.9888 0.900 0.3203)
118 '(18 200 1 1.0))
119 '(48.0314 38.7789 191.0452)
120 0.02))
121 (should
122 (lcms-triple-approx-p
123 (lcms-xyz->jch '(0.1931 0.2393 0.1014)
124 '(0.9888 0.90 0.3203)
125 '(18 20 1 1.0))
126 '(47.6856 36.0527 185.3445)
127 0.09)))
128
97(ert-deftest lcms-dE-cam02-ucs-silver () 129(ert-deftest lcms-dE-cam02-ucs-silver ()
98 "Test CRI-CAM02-UCS deltaE metric values from colorspacious." 130 "Test CRI-CAM02-UCS deltaE metric values from colorspacious."
99 (skip-unless (featurep 'lcms2)) 131 (skip-unless (featurep 'lcms2))
@@ -114,4 +146,16 @@ B is considered the exact value."
114 8.503323264883667 146 8.503323264883667
115 0.04))) 147 0.04)))
116 148
149(ert-deftest lcms-jmh->cam02-ucs-silver ()
150 "Compare JCh conversion to CAM02-UCS to values from colorspacious."
151 (skip-unless (featurep 'lcms2))
152 (should
153 (lcms-triple-approx-p (lcms-jch->jab '(50 20 10))
154 '(62.96296296 16.22742674 2.86133316)
155 0.05))
156 (should
157 (lcms-triple-approx-p (lcms-jch->jab '(10 60 100))
158 '(15.88785047 -6.56546789 37.23461867)
159 0.04)))
160
117;;; lcms-tests.el ends here 161;;; lcms-tests.el ends here