ObjFW  Diff

Differences From Artifact [56c53e54e1]:

To Artifact [a80b9ca389]:


19
20
21
22
23
24
25

26
27
28
29
30
31
32
#include <stdlib.h>
#include <string.h>
#include <math.h>

#import "OFString.h"
#import "OFMutableString_UTF8.h"
#import "OFArray.h"

#import "OFURL.h"
#import "OFAutoreleasePool.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"







>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdlib.h>
#include <string.h>
#include <math.h>

#import "OFString.h"
#import "OFMutableString_UTF8.h"
#import "OFArray.h"
#import "OFCharacterSet.h"
#import "OFURL.h"
#import "OFAutoreleasePool.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"
778
779
780
781
782
783
784
785
786

787
788
789
790
791
792
793
	    @"73286da882ffddca2f45e005cfa6b44f3fc65bfb26db1d08"
	    @"7ded2f9c279e5addf8be854044bca0cece073fce28eec7d9"])

	TEST(@"-[SHA512Hash]", [[C(@"asdfoobar") SHA512Hash] isEqual:
	    @"0464c427da158b02161bb44a3090bbfc594611ef6a53603640454b56412a9247c"
	    @"3579a329e53a5dc74676b106755e3394f9454a2d42273242615d32f80437d61"])

	TEST(@"-[stringByURLEncoding]",
	    [[C(@"foo\"ba'_~$]") stringByURLEncoding]

	    isEqual: @"foo%22ba'_~$%5D"])

	TEST(@"-[stringByURLDecoding]",
	    [[C(@"foo%20bar%22+%24") stringByURLDecoding]
	    isEqual: @"foo bar\"+$"])

	TEST(@"-[insertString:atIndex:]",







|
|
>







779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
	    @"73286da882ffddca2f45e005cfa6b44f3fc65bfb26db1d08"
	    @"7ded2f9c279e5addf8be854044bca0cece073fce28eec7d9"])

	TEST(@"-[SHA512Hash]", [[C(@"asdfoobar") SHA512Hash] isEqual:
	    @"0464c427da158b02161bb44a3090bbfc594611ef6a53603640454b56412a9247c"
	    @"3579a329e53a5dc74676b106755e3394f9454a2d42273242615d32f80437d61"])

	TEST(@"-[stringByURLEncodingWithAllowedCharacters:]",
	    [[C(@"foo\"ba'_~$]") stringByURLEncodingWithAllowedCharacters:
	    [OFCharacterSet URLPathAllowedCharacterSet]]
	    isEqual: @"foo%22ba'_~$%5D"])

	TEST(@"-[stringByURLDecoding]",
	    [[C(@"foo%20bar%22+%24") stringByURLDecoding]
	    isEqual: @"foo bar\"+$"])

	TEST(@"-[insertString:atIndex:]",