save_object.c

v22.2b14/testsuite/single/tests/efuns/save_object.c · 303 B

From the archive beta.tar.gz

Download the archive   « Back to the archive contents

int x = 0;
#ifndef __SENSIBLE_MODIFIERS__
static int z = 5;
#else
nosave int z = 5;
#endif
int y = 1;

void do_tests() {
    save_object("/sf");
    ASSERT(read_file("/sf.o") == "#" + __FILE__ + "\ny 1\n");
    save_object("/sf", 1);
    ASSERT(read_file("/sf.o") == "#" + __FILE__ + "\nx 0\ny 1\n");
}

Site Stats

Snippets: 1791
Codebases: 571