Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ZnCharacterStreamTests #testUpToAll and #testUpToAllTwice are now failing #79

Closed
dalehenrich opened this issue Dec 8, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@dalehenrich
Copy link
Member

These two tests were skipped dating back to my original port of FileSystem to GemStone and today I turned the testing back on and the tests are now failing ... so it is time for me to pay the piper and bring the #upToAll: implementation up to snuff

@dalehenrich dalehenrich added the bug Something isn't working label Dec 8, 2022
@dalehenrich dalehenrich self-assigned this Dec 8, 2022
dalehenrich added a commit that referenced this issue Dec 10, 2022
… ZnCharacterStreamTests >> testUpToAllTwice is not ...
dalehenrich added a commit that referenced this issue Dec 10, 2022
…testUpToAllTwice, so added utf8 encoded streams to #testUpToAll (and boom) also updated #testUpToAll samples to include strings from #testUpToAllTwice ... failing tests
dalehenrich added a commit that referenced this issue Dec 11, 2022
…treamPosition to illustrate what I think should be a bug
@dalehenrich
Copy link
Member Author

as of this commit [69e837d], I believe that the #upToAll: implementation is complete, however, there seem to be some issues with the #position method and ZnCharacterReadStream on UTF8 encoded streams:

	| string bytes stream res |
	string := 'eißendeße'.
	bytes := ZnUTF8Encoder new encodeString: string.
	stream := (ZnCharacterReadStream on: bytes readStreamPortable).
	res := stream next; next; next.
	self assert: res equals: $ß.
	self assert: stream position equals: 3.

So will hold off until the issue is resolved..

dalehenrich added a commit that referenced this issue Dec 12, 2022
…on test for completeness, reorder the samples in ZnCharacterStreamTests >> testUpToAll and fix some regressions that snuck in while working on utf8 variant
@dalehenrich
Copy link
Member Author

Issue #80 reports the above problem

@dalehenrich
Copy link
Member Author

Will close this issue in anticipation of Issue #80 resolving the current test failures, but can be re-opened if necessary

@kurtkilpela
Copy link
Member

kurtkilpela commented Jan 18, 2023

I switched implementations of #upToAll: and updated #testUpToAllTwice which was using (Character codePoint: 150) and similar expressions. These are out of range of Unicode7. They cause it to promote to Unicode16, which the 8BitEncoder is not designed to support. I disabled them when the #stringClass is Unicode7.

See 391b3e4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants