tests/codecs (m-z): comments: specs only
This commit is contained in:
1 parent
98b4ce533e
commit
a6732d45f2
23 files changed
+46
-177
No files matched your search
@@ -1,7 +1,4 @@
|
||||
-- codecs/model/Vrml tests: the classic-encoding lexer and parser (comments, commas, string escapes, hex / exponent
|
||||
-- numbers, DEF / USE, PROTO with IS fields, nested PROTOs and ROUTEs in bodies, EXTERNPROTO, Script interfaces,
|
||||
-- IMPORT / EXPORT, the X3D header statements), the XML encoding's adapter (containerField, ProtoDeclare /
|
||||
-- ProtoInstance, IS / connect), typed field reads of raw XML attributes, detection, errors, the fuzz pass.
|
||||
-- codecs/model/Vrml tests: the classic-encoding lexer and parser, the XML encoding's adapter, detection, errors.
|
||||
local T = require("@tests/T")
|
||||
local Vrml = require("@rosetta/codecs/model/Vrml")
|
||||
local Fields = require("@rosetta/codecs/model/Vrml/Fields")
|
||||
@@ -9,7 +6,6 @@ local Err = require("@rosetta/core/Err")
|
||||
|
||||
local t = T.suite("vrml codec")
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ lexer / parser
|
||||
do
|
||||
local g = assert(Vrml.parse([[#VRML V2.0 utf8
|
||||
# a comment, then commas as blanks
|
||||
@@ -81,7 +77,6 @@ do
|
||||
t:eq(s.meta.unit, 0.3048, "UNIT length -> meta.unit")
|
||||
end
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ XML adapter
|
||||
do
|
||||
local g = assert(Vrml.graph([[<?xml version="1.0"?>
|
||||
<X3D profile="Interchange" version="4.0"><head><component name="Shaders" level="1"/></head><Scene>
|
||||
@@ -111,7 +106,6 @@ do
|
||||
t:eq(Fields.strs(single, "url")[1], "plain name.png", "unquoted single MFString")
|
||||
end
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ errors
|
||||
do
|
||||
local function code(text: string): string?
|
||||
local _, e = Vrml.graph(text)
|
||||
@@ -129,7 +123,6 @@ do
|
||||
t:eq(e and e.code, Err.ARG, "encode junk")
|
||||
end
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ fuzz
|
||||
do
|
||||
local samples = {
|
||||
"#VRML V2.0 utf8\nPROTO P [ field SFFloat a 1 ] { Box { size IS a IS a } }\nDEF X P { a 2 } USE X ROUTE X.a TO X.b\n",
|
||||
|
||||
Reference in new issue
Block a user