This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: generating type tests


My hunch it is trying to do too much - simultaneously acting as both filter and generator. For instance:
-> structs is created from a brute force table
-> scalars is generated using a for loop
would it be better to separate these steps out, perhaps also having a separate data file, then this can be implemented as one or more filters.


As things advance, will the types that need to be tested become too complex for this scripting technique? For instance:
struct foo { int i; } f = { 1 };
struct bar { struct foo* f; struct bar *b;};
struct bar b = { NULL, NULL }
struct bar bp = { &f, &b };
I wonder if letting the user describe the types in C, and output in comments, and then filter that to generate the tests is better? Vis:
// TEST: bp
// TYPE: struct bar { struct foo *f; struct bar *b}
// VALUE: { 0x.*, 0x.* }
// STYPE: struct bar
is going to be easier to work on. Similarly, chosing simple values may make it easier.


Andrew





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]