[x3d-public] X3DJSAIL (I think Don asked for help with these problems (anyone?). Maybe print the array in full, don?

Andreas Plesch andreasplesch at gmail.com
Tue Jul 17 07:31:30 PDT 2018


JUnit 5 probably has regex testing, so I think the idea is to
integrate that test framework first.

Here is Don's and my earlier exchange:

Excellent. My first suspicion would be use of escaping in the regex
pattern, for use with the Pattern.matches et al. methods, which are
the methods which seem to be used in X3DJSAIL according to the API
docs.. The back-slashes need to be escaped so they survive until
delivered to the regex processing.

-Andreas

On Thu, Jul 5, 2018 at 10:39 AM Don Brutzman <brutzman at nps.edu> wrote:
>
> Thanks for the analysis, very helpful.
>
> Not ready yet, but I have made progress integrating the JUnit 5 test framework into X3DJSAIL testing.
>
> Once ready, will apply the various/numerous candidate regex tests into pre-release testing.  This will not only help X3DJSAIL but also X3D XML Schema and anything else using X3D Unified Object Model (X3DUOM).
>
> On 7/2/2018 11:10 AM, Andreas Plesch wrote:
> > The default value for SFImage is '0 0 0'. It matches the provided
> > regex according to:
> >
> > https://regex101.com/r/TiRNeO/2
> >
> > What regex engine or flavor is used for X3DJSAIL ?
> >
> > Similarly, the default value for SFColorRGBA '0 0 0 0' matches the
> > provided regex according to:
> >
> > https://regex101.com/r/N9ZQcZ/1/tests
> >
> > It appears that there are some limitations to the regex engine used
> > for X3DJSAIL. In order to proceed, it will be probably necessary to
> > figure out exactly how regex are interpreted with X3DJSAIL. There is
> > probably documentation:
> >
> > http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/fields/SFImageObject.html#pattern
> > points to
> > https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
> >
> > Looks like it is relevant. It points to:
> >
> > https://www.javatpoint.com/java-regex
> >
> > which could be used for testing.
> >
> > Indeed, replacing the java code in
> > https://compiler.javatpoint.com/opr/test.jsp?filename=RegexExample2
> >
> > with
> >
> > import java.util.regex.*;
> > class RegexExample2{
> > public static void main(String args[]){
> > System.out.println(Pattern.matches(
> > "(\\d|[1-9]\\d+)(\\s+(\\d|[1-9]\\d+)){2}(\\s+((0x([a-f]|[A-F]|\\d]){1,8})|[1-9]\\d+|\\d))*",
> > "0 0 0"));//true
> > }}
> >
> > returns true, indicating that the regex actually works. So the problem
> > may be somewhere else ?
> >



> Date: Tue, 17 Jul 2018 07:05:24 -0400
> From: John Carlson <yottzumm at gmail.com>
> To: Don Brutzman <brutzman at nps.edu>,  X3D Graphics public mailing list
>         <x3d-public at web3d.org>
> Subject: [x3d-public] X3DJSAIL (I think Don asked for help with these
>         problems (anyone?). Maybe print the array in full, don?
> Message-ID: <5b4dcd73.1c69fb81.2f25e.3b2e at mx.google.com>
> Content-Type: text/plain; charset="utf-8"
>
>
> SFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 268c4507
> SFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 6ae91e0b
> MFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 50cac642
> MFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 3a76eb7d
> Warning: toFileX3D() is overwriting prior file ../data/asmallbox.new.x3d
> ~/X3DJSONLD/src/main/shell
> ~/X3DJSONLD/src/main/nashorn ~/X3DJSONLD/src/main/shell
> ../nashorn/net/coderextreme/data/ball.sail.js
> SFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 7ec49d9b
> SFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 3977c7e4
> MFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 775e031b
> MFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 18b32b54
> Warning: toFileX3D() is overwriting prior file ../data/ball.new.x3d
> ~/X3DJSONLD/src/main/shell
> ~/X3DJSONLD/src/main/nashorn ~/X3DJSONLD/src/main/shell
> ../nashorn/net/coderextreme/data/BindingOperations.sail.js
> SFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 770d65c2
> SFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 689aab7b
> MFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 4007b86e
> MFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 3e22fa87
> Warning: toFileX3D() is overwriting prior file ../data/BindingOperations.new.x3d
> ~/X3DJSONLD/src/main/shell
> ~/X3DJSONLD/src/main/nashorn ~/X3DJSONLD/src/main/shell
> ../nashorn/net/coderextreme/data/Box.sail.js
> SFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 1abe611c
> SFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 6bf6b454
> MFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 710b20a0
> MFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 607961e4
> Warning: toFileX3D() is overwriting prior file ../data/Box.new.x3d
> ~/X3DJSONLD/src/main/shell
> ~/X3DJSONLD/src/main/nashorn ~/X3DJSONLD/src/main/shell
> ../nashorn/net/coderextreme/data/browser.sail.js
> SFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 6ebdb938
> SFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 7499553f
> MFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 74191752
> MFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 6d2d26be
> Warning: toFileX3D() is overwriting prior file ../data/browser.new.x3d
> Sent from Mail for Windows 10
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180717/f893c83c/attachment.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> ------------------------------
>
> End of x3d-public Digest, Vol 112, Issue 22
> *******************************************



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list