www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - AA with objects on windows

reply Ant <Ant_member pathlink.com> writes:
Is there any known issues with AA on windows when the key is an object?

My AA unittest fail on windows but pass on linux.
My key object is a dool.String.

check the svn repository for dool on dsource (it's down now)
for the str/test for the unittests.

Ant
Apr 25 2005
next sibling parent reply Ant <Ant_member pathlink.com> writes:
In article <d4j5uf$27p3$1 digitaldaemon.com>, Ant says...
Is there any known issues with AA on windows when the key is an object?

My AA unittest fail on windows but pass on linux.
My key object is a dool.String.

check the svn repository for dool on dsource (it's down now)
for the str/test for the unittests.

Ant
what I mean is this, it passes on linux but fails on windows (2000) dmd 0.121: unittest { printf("Unittest AA 1 started\n"); String[String] ss; ss[new String("hello")] = new String("there"); assert(ss[new String("hello")] == new String("there")); printf("Unittest AA 1 passed\n"); } this used to be OK, so I might have changed something else. I'll look for it but if we know that there is something wrong with AAs it might save me a pointeless search and debug. Ant
Apr 25 2005
parent reply "Ben Hinkle" <bhinkle mathworks.com> writes:
"Ant" <Ant_member pathlink.com> wrote in message 
news:d4jacq$2c94$1 digitaldaemon.com...
 In article <d4j5uf$27p3$1 digitaldaemon.com>, Ant says...
Is there any known issues with AA on windows when the key is an object?

My AA unittest fail on windows but pass on linux.
My key object is a dool.String.

check the svn repository for dool on dsource (it's down now)
for the str/test for the unittests.

Ant
what I mean is this, it passes on linux but fails on windows (2000) dmd 0.121: unittest { printf("Unittest AA 1 started\n"); String[String] ss; ss[new String("hello")] = new String("there"); assert(ss[new String("hello")] == new String("there")); printf("Unittest AA 1 passed\n"); } this used to be OK, so I might have changed something else. I'll look for it but if we know that there is something wrong with AAs it might save me a pointeless search and debug. Ant
it could be due to the fact that String.opEquals(char[] str) returns a bit instead of an int.
Apr 25 2005
next sibling parent Ant <Ant_member pathlink.com> writes:
In article <d4jdp4$2fml$1 digitaldaemon.com>, Ben Hinkle says...
"Ant" <Ant_member pathlink.com> wrote in message 
news:d4jacq$2c94$1 digitaldaemon.com...
 In article <d4j5uf$27p3$1 digitaldaemon.com>, Ant says...
Is there any known issues with AA on windows when the key is an object?

My AA unittest fail on windows but pass on linux.
My key object is a dool.String.

check the svn repository for dool on dsource (it's down now)
for the str/test for the unittests.

Ant
what I mean is this, it passes on linux but fails on windows (2000) dmd 0.121: unittest { printf("Unittest AA 1 started\n"); String[String] ss; ss[new String("hello")] = new String("there"); assert(ss[new String("hello")] == new String("there")); printf("Unittest AA 1 passed\n"); } this used to be OK, so I might have changed something else. I'll look for it but if we know that there is something wrong with AAs it might save me a pointeless search and debug. Ant
it could be due to the fact that String.opEquals(char[] str) returns a bit instead of an int.
! I'll check that first. (And I also better check opEquals(Object) receives a null!) thanks, I'll let you know tonight. Ant
Apr 25 2005
prev sibling parent Ant <duitoolkit yahoo.ca> writes:
Ben Hinkle wrote:

 it could be due to the fact that String.opEquals(char[] str) returns a bit 
 instead of an int. 
nahh... next I'll check the DMD differences between linux and windows... (I just triple check, it works fine on linux dmd 0.121) Ant (as usual I'll spend more time fighting dmd then actually using it. Unfortunatly I couldn't convince Walter of the importance of the compiler messages right from the begining. I might event postone my plans to get leds working on windows. We'll see. I didn't have time for D today) :(
Apr 25 2005
prev sibling parent "Ben Hinkle" <bhinkle mathworks.com> writes:
"Ant" <Ant_member pathlink.com> wrote in message 
news:d4j5uf$27p3$1 digitaldaemon.com...
 Is there any known issues with AA on windows when the key is an object?

 My AA unittest fail on windows but pass on linux.
 My key object is a dool.String.

 check the svn repository for dool on dsource (it's down now)
 for the str/test for the unittests.

 Ant
I grabbed dool.String and dool.util.Utf from dsource and the String unittests pass fine on my WinXP box. The utf unittests fail but I commented those out.
Apr 26 2005