Skip to content

Commit 2a774da

Browse files
committed
feat: test whole flag space rendering
1 parent d2001b5 commit 2a774da

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

rdtest_helpers.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "rdtest_helpers.h"
22
#include "rdtest.h"
33
#include <inttypes.h>
4+
#include <stdint.h>
45
#include <stdio.h>
56
#include <stdlib.h>
67
#include <string.h>
@@ -90,6 +91,20 @@ static int _rdtest_run(RDTestSample* sample) {
9091
rdtest_assert_pass(rdtest_check_xrefs(sample->ctx, sample->xrefs));
9192
rdtest_assert_pass(rdtest_check_externals(sample->ctx, sample->externals));
9293

94+
RDAddressSpace aspace = rd_get_address_space(sample->ctx);
95+
rdtest_assert_ne(aspace.start, aspace.end);
96+
rdtest_assert_true(aspace.size > 0);
97+
98+
if(!sample->skip_rendering) {
99+
RDSurface* s = rd_surface_create(sample->ctx, RD_RF_DEFAULT);
100+
rdtest_assert_notnull(s);
101+
102+
rd_surface_set_max_rows(s, SIZE_MAX); // render everything
103+
rdtest_assert_true(rd_surface_jump_to(s, aspace.start));
104+
105+
rd_surface_destroy(s);
106+
}
107+
93108
return RDTEST_PASS;
94109
}
95110

rdtest_helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ typedef struct RDTestSample {
4444
const char* loader_id;
4545
const char* processor_id;
4646

47+
bool skip_rendering;
48+
4749
struct {
4850
RDAddress value;
4951
bool has_value;

0 commit comments

Comments
 (0)