Skip to content

Conversation

yebblies
Copy link
Contributor

@yebblies yebblies commented Feb 5, 2014

No description provided.

@@ -3322,7 +3322,7 @@ version(unittest)
import std.conv, std.range, std.algorithm;
//ensure constructor handles bad ordering and overlap
auto c1 = CodepointSet('а', 'я'+1, 'А','Я'+1);
foreach(ch; chain(iota('a', 'я'+1)), iota('А','Я'+1))
foreach(ch; chain(iota('a', 'я'+1), iota('А','Я'+1)))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this is why...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good thing we have @blackwhale to write bad code to help us prove the dangers of comma operator or implicit string concatenation :)

End joke, he writes good code, abd also a lot of code :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good thing we have @blackwhale to write bad code to help us prove the dangers of comma operator or implicit string concatenation :)

LOL. Much obliged ;)

@ghost
Copy link

ghost commented Feb 5, 2014

The failures in the tester are bizarre.

@ghost
Copy link

ghost commented Feb 6, 2014

@yebblies: Any idea what's causing the failure?

@yebblies
Copy link
Contributor Author

yebblies commented Feb 6, 2014

Nope. I guess I'll binary-search it.

: fmt.trailing;
if (sep)
fmt.readUpToNextSpec(input);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is causing the failures...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe readUpToNextSpec can change sep? IDK, but it seems to work with the above the condexp.

@ghost
Copy link

ghost commented Feb 16, 2014

@yebblies: Seems like maybe std.uni's unittest was bad to begin with? You could just comment that out and file a separate bug so this pull request isn't stalled.

@yebblies
Copy link
Contributor Author

This isn't very high on my priority list right now, I'll get around to it eventually.

@dnadlinger
Copy link
Contributor

@blackwhale: Ping. Any idea about the failure?

@DmitryOlshansky
Copy link
Member

@klickverbot I'll investigate.

@DmitryOlshansky
Copy link
Member

This code passes with or without this pull:

  auto c1 = CodepointSet('А','Я'+1, 'а', 'я'+1);
    assert(c1.byCodepoint.equal(chain(
        iota('А','Я'+1), iota('а', 'я'+1))));

However I get a cascade of failures including bad seed in std.random when unittesting phobos on Win32. The havoc ends with a segfault.somewhere.

@monarchdodra
Copy link
Collaborator

This code passes with or without this pull:

The issue is that the test should use the 'CYRILLIC SMALL LETTER A' (1072; 0x0430). http://www.fileformat.info/info/unicode/char/0430/index.htm

But currently, the code has 'LATIN SMALL LETTER A' (97; 0x61).

That's the issue.

@DmitryOlshansky
Copy link
Member

@monarchdodra Good catch :)

@monarchdodra
Copy link
Collaborator

@monarchdodra Good catch :)

@blackwhale : Thanks. I would have caught it sooner had I known 'a' was the first Cyrillic letter. I was observing the unittest going haywire, but couldn't make any sense out of what I was observing, or even what you were trying to test. Maybe hiragana would make a better candidate for testing? Less ambiguity. Well, I figure you just used whatever was in the bug report.

In any case, while tracking down the issue, I wished for this feature:
https://d.puremagic.com/issues/show_bug.cgi?id=12184
I'd say it's very low priority, but it never hurts to have it filed.

@ghost
Copy link

ghost commented Feb 17, 2014

@blackwhale @monarchdodra : Could one of you make a pull with the fix so #1908 isn't blocked?

@monarchdodra
Copy link
Collaborator

Could one of you make a pull with the fix so #1908 isn't blocked?

@AndrejMitrovic : Done : #1951 . @yebblies will still have to rebase, but at least it's fixed.

Hum... Or, when I get back home, I can push the fix straight into your branch instead?

monarchdodra and others added 2 commits February 18, 2014 00:47
'LATIN SMALL LETTER A' => 'CYRILLIC SMALL LETTER A'
@monarchdodra
Copy link
Collaborator

Auto-merge toggled on

monarchdodra added a commit that referenced this pull request Feb 17, 2014
Remove uses of the comma operator
@monarchdodra monarchdodra merged commit 7d8e066 into dlang:master Feb 17, 2014
@yebblies yebblies deleted the commaop branch February 18, 2014 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants