Uhm, okay. I'm not sure I understand what you mean. The header file defines 
only protocols and interfaces for existing classes.

I added this test that checks if the class of NSDictionary is the class of an 
instance of NSDictionary, and specified for all NSDictionaries that they 
implement BSONCoding.

https://github.com/pepijndevos/bson-objc/blob/master/gnutest/gnutest.m#L8


The surprising result, on Mac(which works fine):
Failed test:       gnutest.m:9 ... NSDictionary is an NSDictionary.

On Linux:
Failed set:        gnutest.m:13 ... problem in Array.
Failed set:        gnutest.m:119 ... problem in Null.
Failed set:        gnutest.m:142 ... problem in Number.

Still the same exception in the logs.


Oops, I just noticed some replies that ended up in my spam folder. Really sorry 
about that. No wonder I got so few replies.

Pepijn


________________________________
 From: Richard Frith-Macdonald <[email protected]>
To: pepijn de vos <[email protected]> 
Cc: "[email protected]" <[email protected]> 
Sent: Wednesday, September 19, 2012 9:48 AM
Subject: Re: Converting xcodeproj to makefile
 

On 18 Sep 2012, at 12:01, pepijn de vos wrote:

> The workaround was just to do a normal message. Not sure what the magic was 
> all about.
> 
> It works on my Mac with GNUstep make now, and it compiles on Linux, but after 
> I ported the test suit, I got this message:
> 
> EXCEPTION: NSInvalidArgumentException GSDictionary(instance) does not 
> recognize BSONEncode (null)
> 
> That method is added to NSDictionary using a category, over here: 
> https://github.com/pepijndevos/bson-objc/blob/master/BSONCodec.h#L31
> 
> So problem one: How do I make that category work?

To make a category work, you need to get it linked/loaded in to your program 
... which may mean that some code in your program needs to refer to something 
in the file containing the category.
eg. of the category is in a file foo.m containing the class foo, your code 
could call [foo class] just so that the linker will pull that into your program 
ensuring that the category will eb there at runtime.



> Problem two: How do I run the rest of the tests? (those that require the 
> Base64 encoding)

I haven't looked, but if you need to add base64 encoding/decoding support, 
gnustep-base already has some base64 methods  as extensions in the GSMime class.
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to