ObjFW  Check-in [da0a27ee23]

Overview
Comment:OFDataTests: Fix wrong test description
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: da0a27ee23650a77796d80136fe71061287d89670e938ed666ccd3920c028576
User & Date: js on 2021-01-01 22:28:13
Other Links: manifest | tags
Context
2021-01-01
22:34
of_asprintf: Work around %z missing on HP-UX check-in: 8c41063a76 user: js tags: trunk
22:28
OFDataTests: Fix wrong test description check-in: da0a27ee23 user: js tags: trunk
22:27
Workaround for binding to UDP port 0 on HP-UX check-in: c98b667229 user: js tags: trunk
Changes

Modified tests/OFDataTests.m from [2bd92fc7fc] to [971cb01a2a].

89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
			   atIndex: 1
			     count: 2]) && mutable.count == 5 &&
	    memcmp(mutable.items, "abcde", 5) == 0)

	immutable = [OFData dataWithItems: "aaabaccdacaabb"
				    count: 7
				 itemSize: 2];
	TEST(@"-[rangeOfString:options:range:]",
	    R(range = [immutable rangeOfData: [OFData dataWithItems: "aa"
							      count: 1
							   itemSize: 2]
				     options: 0
				       range: of_range(0, 7)]) &&
	    range.location == 0 && range.length == 1 &&
	    R(range = [immutable rangeOfData: [OFData dataWithItems: "aa"







|







89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
			   atIndex: 1
			     count: 2]) && mutable.count == 5 &&
	    memcmp(mutable.items, "abcde", 5) == 0)

	immutable = [OFData dataWithItems: "aaabaccdacaabb"
				    count: 7
				 itemSize: 2];
	TEST(@"-[rangeOfData:options:range:]",
	    R(range = [immutable rangeOfData: [OFData dataWithItems: "aa"
							      count: 1
							   itemSize: 2]
				     options: 0
				       range: of_range(0, 7)]) &&
	    range.location == 0 && range.length == 1 &&
	    R(range = [immutable rangeOfData: [OFData dataWithItems: "aa"
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
							      count: 1
							   itemSize: 2]
				     options: OF_DATA_SEARCH_BACKWARDS
				       range: of_range(0, 5)]) &&
	    range.location == 0 && range.length == 1)

	EXPECT_EXCEPTION(
	    @"-[rangeOfString:options:range:] failing on different itemSize",
	    OFInvalidArgumentException,
	    [immutable rangeOfData: [OFData dataWithItems: "aaa"
						    count: 1
						 itemSize: 3]
			   options: 0
			     range: of_range(0, 1)])








|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
							      count: 1
							   itemSize: 2]
				     options: OF_DATA_SEARCH_BACKWARDS
				       range: of_range(0, 5)]) &&
	    range.location == 0 && range.length == 1)

	EXPECT_EXCEPTION(
	    @"-[rangeOfData:options:range:] failing on different itemSize",
	    OFInvalidArgumentException,
	    [immutable rangeOfData: [OFData dataWithItems: "aaa"
						    count: 1
						 itemSize: 3]
			   options: 0
			     range: of_range(0, 1)])