Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Some evil test cases for paths #156

Open
jeswr opened this issue Mar 9, 2023 · 2 comments
Open

Some evil test cases for paths #156

jeswr opened this issue Mar 9, 2023 · 2 comments
Labels

Comments

@jeswr
Copy link
Member

jeswr commented Mar 9, 2023

In N3.js I'm planning to add these unit tests to catch common errors around lists and paths. In particular it would be good to see cases like (()!:p)^:p2!:p3 :p4 :o in the evaluation test suite if not already present.

@william-vw
Copy link
Collaborator

@jeswr Please add a PR with the test cases you are planning here.

@TallTed
Copy link
Member

TallTed commented Apr 3, 2023

I would like to see both maximally human-friendly (i.e., including all optional whitespace and punctuation) and maximally machine-friendly (i.e., removing all optional whitespace and punctuation) in the unit tests and the documentation. The former is to increase comprehension by humans learning from these tests, and the latter is to ensure maximal optimization by implementations (over time, if not immediately).

The case noted above ((()!:p)^:p2!:p3 :p4 :o) is especially challenging for a human to parse, as written, but should be fairly easily handled by any relevant software implementation. Filling it out with extra space and/or CRLF characters will increase human comprehension, and should not impact software implementation, though it will increase data volume (which is why these optional characters are expected to be left out of optimized implementations).

(I know I am speaking to people who have already internalized much of what I am asking to be spelled out. My goal is to make everything comprehensible and accessible by people who are new to these topics and serializations.)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants