X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/dea6ee94a659dbe4794fa450037664781009d4eb..a13386ba3e5cbeecd0e4315a423e3280dabf0f1c:/test/test.sod?ds=sidebyside diff --git a/test/test.sod b/test/test.sod index ee74da3..72febd5 100644 --- a/test/test.sod +++ b/test/test.sod @@ -161,10 +161,13 @@ static int check_vec(struct vec *v, ...) [link = SodObject, nick = base] class T1Base: SodObject { + int plain(int x) { STEP(x); return (x + 1); } + [combination = progn] void aprogn(); [combination = sum] int asum(); [combination = and] int aand(); [combination = max] int amax(); + [role = around] int base.asum() { return (CALL_NEXT_METHOD); } [combination = custom, empty = { sod_ret = 0; }, @@ -184,6 +187,7 @@ class T1Base: SodObject { [link = T1Base, nick = mid] class T1Mid: T1Base { + int base.plain(int x) { STEP(x - 1); return (CALL_NEXT_METHOD); } void base.aprogn() { STEP(1); } int base.asum() { return 1; } int base.aand() { return 8; } @@ -215,7 +219,8 @@ code c: tests { if (!l) STEP(5); v = T1Base_avec(t1); if (!v.n) STEP(6); - DONE(7); + STEP(T1Base_plain(t1, 7)); /* 7, 8 */ + DONE(9); } prepare("aggregate, mid"); { SOD_DECL(T1Mid, t1, NO_KWARGS); @@ -231,7 +236,8 @@ code c: tests { v = T1Base_avec(t1); if (!check_vec(&v, 19, -1)) STEP(6); free_vec(&v); - DONE(7); + STEP(T1Base_plain(t1, 8)); /* 7, 8, 9 */ + DONE(10); } prepare("aggregate, sub"); { SOD_DECL(T1Sub, t1, NO_KWARGS); @@ -334,7 +340,7 @@ class MyClass: SodClass { int x = -1, y, z = 2; } -[link = SodObject, nick = myobj, metaclass = MyClass] +[nick = myobj, metaclass = MyClass] class MyObject: SodObject { class mycls.x = 0, mycls.y = 1; }