Browse Source

Add XML to tests and readme

master
Macoy Madson 9 months ago
parent
commit
12257394be
  1. 1
      ReadMe.org
  2. 21
      src/XML.cake
  3. 3
      test/src/GameLibTests.cake

1
ReadMe.org

@ -126,6 +126,7 @@ Here are the known compatibility results, where blank means untested/unknown:
| TinyCCompiler.cake | Yes | | Yes | |
| Tracy.cake | Yes | | | |
| WindowsHeader.cake | Yes[2] | Yes[2] | Yes | |
| XML.cake | Yes | Yes | Yes | Yes |
[1] These programs rely on hard-coded OpenGL versions. TODO: Make it automatically decide to use OpenGL ES when necessary.

21
src/XML.cake

@ -166,3 +166,24 @@
(fprintf (token-splice output-file) (token-splice-addr quoted-format-str)
(token-splice-rest format-arguments tokens)))
(return true))
(comptime-cond
('auto-test
(define-xml-format svg
"svg" "title" "!DOCTYPE" "?xml"
"defs" "mask" "g"
"rect" "path" "circle")
(defun test--xml (&return int)
(write-xml-in-format
svg stderr
(?xml :version "1.0" :encoding "UTF-8" :standalone "no")
(svg
:width "100%" :height "100%"
;; This is required to get the SVG to work in Firefox
:xmlns "http://www.w3.org/2000/svg" :version "1.1"
;; Background
(rect :x 0 :y 0 :width "100%" :height "100%" :fill "#333333")
(each-in-range 3 i
(rect :x (format-quote stderr "%din" (* i 2)) :y (format-quote stderr "%fin" (* i 3.5f))
:width "5in" :height "2in" :fill "#aaaaaa"))))
(return 0))))

3
test/src/GameLibTests.cake

@ -68,6 +68,7 @@
"../src/TaskSystem.cake" "../src/Image.cake" "../src/DataBundle.cake"
"../src/TinyCCompiler.cake" "../src/FreeType.cake" "../src/Allocator.cake"
"../src/Oniguruma.cake" "../src/Cryptography.cake" "../src/Compression.cake"
"../src/XML.cake"
;; Note: Must come before Curl because curl requires openssl
"../src/OpenSSL.cake" "../src/Curl.cake")))
@ -89,7 +90,7 @@
"../src/Raylib.cake" "../src/Image.cake"
"../src/DataBundle.cake" "../src/TinyCCompiler.cake" "../src/FreeType.cake"
"../src/Compression.cake" "../src/Cryptography.cake"
"../src/OpenSSL.cake" "../src/Curl.cake"
"../src/OpenSSL.cake" "../src/Curl.cake" "../src/XML.cake"
"../src/ImGuiAutoColor.cake" "../src/ProfilerAutoInstrument.cake"))
(when test-ogre

Loading…
Cancel
Save