@@ -24,39 +24,39 @@ TEST(MemoryTests, FW170Test) {
2424 // Null address with MAP_FIXED is now prohibited from the libkernel side.
2525 uint64_t addr = 0 ;
2626 result = sceKernelMapDirectMemory (&addr, 0x4000 , 3 , 0x10 , phys_addr, 0 );
27- LONGS_EQUAL (ORBIS_KERNEL_ERROR_EINVAL, result);
27+ UNSIGNED_INT_EQUALS (ORBIS_KERNEL_ERROR_EINVAL, result);
2828
2929 result = sceKernelMapNamedDirectMemory (&addr, 0x4000 , 3 , 0x10 , phys_addr, 0 , " name" );
30- LONGS_EQUAL (ORBIS_KERNEL_ERROR_EINVAL, result);
30+ UNSIGNED_INT_EQUALS (ORBIS_KERNEL_ERROR_EINVAL, result);
3131
3232 result = sceKernelMapFlexibleMemory (&addr, 0x4000 , 3 , 0x10 );
33- LONGS_EQUAL (ORBIS_KERNEL_ERROR_EINVAL, result);
33+ UNSIGNED_INT_EQUALS (ORBIS_KERNEL_ERROR_EINVAL, result);
3434
3535 result = sceKernelMapNamedFlexibleMemory (&addr, 0x4000 , 3 , 0x10 , " name" );
36- LONGS_EQUAL (ORBIS_KERNEL_ERROR_EINVAL, result);
36+ UNSIGNED_INT_EQUALS (ORBIS_KERNEL_ERROR_EINVAL, result);
3737
3838 result = sceKernelReserveVirtualRange (&addr, 0x4000 , 0x10 , 0 );
39- LONGS_EQUAL (ORBIS_KERNEL_ERROR_EINVAL, result);
39+ UNSIGNED_INT_EQUALS (ORBIS_KERNEL_ERROR_EINVAL, result);
4040
4141 result = sceKernelMapNamedSystemFlexibleMemory (&addr, 0x4000 , 3 , 0x10 , " name" );
42- LONGS_EQUAL (ORBIS_KERNEL_ERROR_EINVAL, result);
42+ UNSIGNED_INT_EQUALS (ORBIS_KERNEL_ERROR_EINVAL, result);
4343
4444 // Note: Pool 1 should match sceKernelMapDirectMemory behavior.
4545 result = sceKernelInternalMapDirectMemory (1 , &addr, 0x4000 , 3 , 0x10 , phys_addr, 0 );
46- LONGS_EQUAL (ORBIS_KERNEL_ERROR_EINVAL, result);
46+ UNSIGNED_INT_EQUALS (ORBIS_KERNEL_ERROR_EINVAL, result);
4747
4848 result = sceKernelInternalMapNamedDirectMemory (1 , &addr, 0x4000 , 3 , 0x10 , phys_addr, 0 , " name" );
49- LONGS_EQUAL (ORBIS_KERNEL_ERROR_EINVAL, result);
49+ UNSIGNED_INT_EQUALS (ORBIS_KERNEL_ERROR_EINVAL, result);
5050
5151 // mmap and sceKernelMemoryPoolReserve both still reach the mmap syscall, but error there like fw 1.00 does.
5252 result = sceKernelMmap (addr, 0x4000 , 3 , 0x1010 , -1 , 0 , &addr);
53- LONGS_EQUAL (ORBIS_KERNEL_ERROR_EINVAL, result);
53+ UNSIGNED_INT_EQUALS (ORBIS_KERNEL_ERROR_EINVAL, result);
5454
5555 result = sceKernelMemoryPoolReserve (addr, 0x4000 , 0 , 0x10 , &addr);
56- LONGS_EQUAL (ORBIS_KERNEL_ERROR_EINVAL, result);
56+ UNSIGNED_INT_EQUALS (ORBIS_KERNEL_ERROR_EINVAL, result);
5757
5858 result = sceKernelReleaseDirectMemory (phys_addr, 0x4000 );
59- LONGS_EQUAL (0 , result);
59+ UNSIGNED_INT_EQUALS (0 , result);
6060}
6161
6262// Test behavior that changed in firmware 2.00, these differences should not be present here.
@@ -120,77 +120,77 @@ TEST(MemoryTests, FW200Test) {
120120 uint64_t base_addr = 0x2000000000 ;
121121 uint64_t addr = base_addr;
122122 int32_t result = map_func (&addr, 0x20000 , -1 , 0x100000 , 0x10 );
123- LONGS_EQUAL (0 , result);
123+ UNSIGNED_INT_EQUALS (0 , result);
124124
125125 addr = base_addr + 0x80000 ;
126126 result = map_func (&addr, 0x20000 , -1 , 0x180000 , 0x10 );
127- LONGS_EQUAL (0 , result);
127+ UNSIGNED_INT_EQUALS (0 , result);
128128
129129 addr = base_addr + 0x20000 ;
130130 result = map_func (&addr, 0x20000 , -1 , 0x120000 , 0x10 );
131- LONGS_EQUAL (0 , result);
131+ UNSIGNED_INT_EQUALS (0 , result);
132132
133133 addr = base_addr + 0x60000 ;
134134 result = map_func (&addr, 0x20000 , -1 , 0x160000 , 0x10 );
135- LONGS_EQUAL (0 , result);
135+ UNSIGNED_INT_EQUALS (0 , result);
136136
137137 mem_scan ();
138138
139139 // On firmware 2.00, there will be 2 mappings. Here, there should be 4.
140140 uint64_t start_addr;
141141 uint64_t end_addr;
142142 result = sceKernelQueryMemoryProtection (base_addr, &start_addr, &end_addr, nullptr );
143- LONGS_EQUAL (0 , result);
143+ UNSIGNED_INT_EQUALS (0 , result);
144144 LONGS_EQUAL (base_addr, start_addr);
145145 LONGS_EQUAL (base_addr + 0x20000 , end_addr);
146146
147147 result = sceKernelQueryMemoryProtection (base_addr + 0x20000 , &start_addr, &end_addr, nullptr );
148- LONGS_EQUAL (0 , result);
148+ UNSIGNED_INT_EQUALS (0 , result);
149149 LONGS_EQUAL (base_addr + 0x20000 , start_addr);
150150 LONGS_EQUAL (base_addr + 0x40000 , end_addr);
151151
152152 result = sceKernelQueryMemoryProtection (base_addr + 0x60000 , &start_addr, &end_addr, nullptr );
153- LONGS_EQUAL (0 , result);
153+ UNSIGNED_INT_EQUALS (0 , result);
154154 LONGS_EQUAL (base_addr + 0x60000 , start_addr);
155155 LONGS_EQUAL (base_addr + 0x80000 , end_addr);
156156
157157 result = sceKernelQueryMemoryProtection (base_addr + 0x80000 , &start_addr, &end_addr, nullptr );
158- LONGS_EQUAL (0 , result);
158+ UNSIGNED_INT_EQUALS (0 , result);
159159 LONGS_EQUAL (base_addr + 0x80000 , start_addr);
160160 LONGS_EQUAL (base_addr + 0xa0000 , end_addr);
161161
162162 // Test making a mapping in between these other mappings.
163163 addr = base_addr + 0x40000 ;
164164 result = map_func (&addr, 0x20000 , -1 , 0x140000 , 0x10 );
165- LONGS_EQUAL (0 , result);
165+ UNSIGNED_INT_EQUALS (0 , result);
166166
167167 // There should now be 5 mappings.
168168 result = sceKernelQueryMemoryProtection (base_addr, &start_addr, &end_addr, nullptr );
169- LONGS_EQUAL (0 , result);
169+ UNSIGNED_INT_EQUALS (0 , result);
170170 LONGS_EQUAL (base_addr, start_addr);
171171 LONGS_EQUAL (base_addr + 0x20000 , end_addr);
172172
173173 result = sceKernelQueryMemoryProtection (base_addr + 0x20000 , &start_addr, &end_addr, nullptr );
174- LONGS_EQUAL (0 , result);
174+ UNSIGNED_INT_EQUALS (0 , result);
175175 LONGS_EQUAL (base_addr + 0x20000 , start_addr);
176176 LONGS_EQUAL (base_addr + 0x40000 , end_addr);
177177
178178 result = sceKernelQueryMemoryProtection (base_addr + 0x40000 , &start_addr, &end_addr, nullptr );
179- LONGS_EQUAL (0 , result);
179+ UNSIGNED_INT_EQUALS (0 , result);
180180 LONGS_EQUAL (base_addr + 0x40000 , start_addr);
181181 LONGS_EQUAL (base_addr + 0x60000 , end_addr);
182182
183183 result = sceKernelQueryMemoryProtection (base_addr + 0x60000 , &start_addr, &end_addr, nullptr );
184- LONGS_EQUAL (0 , result);
184+ UNSIGNED_INT_EQUALS (0 , result);
185185 LONGS_EQUAL (base_addr + 0x60000 , start_addr);
186186 LONGS_EQUAL (base_addr + 0x80000 , end_addr);
187187
188188 result = sceKernelQueryMemoryProtection (base_addr + 0x80000 , &start_addr, &end_addr, nullptr );
189- LONGS_EQUAL (0 , result);
189+ UNSIGNED_INT_EQUALS (0 , result);
190190 LONGS_EQUAL (base_addr + 0x80000 , start_addr);
191191 LONGS_EQUAL (base_addr + 0xa0000 , end_addr);
192192
193193 // Unmap testing memory.
194194 result = unmap_func (base_addr, 0xa0000 );
195- LONGS_EQUAL (0 , result);
195+ UNSIGNED_INT_EQUALS (0 , result);
196196}
0 commit comments