summary refs log tree commit diff stats
path: root/tests/specials.nim
Commit message (Collapse)AuthorAgeFilesLines
* first version of a simple mark&sweep GC; activate with --gc:markAndSweepAraq2013-02-071-0/+4
|
* cleaner GC switchingAraq2013-01-311-0/+1
|
* small bugfix for lambdalifting; preparations for a better testing frameworkAraq2013-01-191-1/+1
|
* bugfix: typeinfo generationAraq2012-09-211-0/+1
|
* bugfix: tester does not hang anymoreAraq2012-09-211-3/+3
|
* bugfix: 'nimrod i' works againAraq2012-09-181-0/+4
|
* activated tests for tr macrosAraq2012-09-061-1/+3
|
* fixed the rodfiles testsZahary Karadjov2012-07-201-5/+0
|
* added devel/logging; weakrefs test; next steps for proper unsigned supportAraq2012-07-051-1/+1
|
* JS codegen improvements; barely usable nowAraq2012-07-021-1/+1
|
* JS codegen enhancements; still unusableAraq2012-07-011-0/+16
|
* GC with realtime supportAraq2012-04-211-0/+2
|
* fix incorrect path for rodfile tests' nimcacheZahary Karadjov2012-04-151-5/+6
|
* re-enable rodfiles tests; fixes #91Zahary Karadjov2012-04-111-1/+2
|
* added docgen.rst2html for the forum; fixed tester bug concerning removeDirAraq2012-02-211-1/+7
|
* tester shouldn't fail when copyFile fails anymoreAraq2012-02-061-2/+8
|
* implemented incompleteStruct pragma; embedded debugger works with posix moduleAraq2012-01-051-1/+8
|
* io test uses dummy compile result objectAraq2012-01-021-1/+3
|
* Merge pull request #86 from Tass/masterAraq2012-01-021-4/+2
|\ | | | | Fixed IO tests.
| * fixed the io tests so they run as intendedSimon Hafner2011-12-311-4/+2
| | | | | | | | | | There is however a problem with the unittest. It does output colors even if stdout isn't a tty, so the test still fails.
* | year 2012 for most copyright headersAraq2012-01-021-1/+1
|/
* MAP_ANONYMOUS is not always 0x20 for linux; changed the testsAraq2011-12-311-2/+13
|
* changed io testsAraq2011-12-311-1/+5
|
* compileSingleTest instead of direct callCompilerSimon Hafner2011-12-301-1/+1
|
* fixes for readAllSimon Hafner2011-12-301-0/+7
|
* fixes #71; sorry about the polling implementationAraq2011-12-051-0/+1
|
* cleaned up configuration file handling and documented the new behaviourAraq2011-11-301-0/+3
|
* old 'readline' and 'endOfFile' not deprecated anymore; too convenient for 1 ↵Araq2011-11-291-1/+1
| | | | liners (see examples/maximum.nim)
* fixed bug that kept tls emulation from workingAraq2011-11-251-1/+1
|
* tester: threading tests addedAraq2011-11-191-3/+7
|
* bugfix: fixed memory leaks in osproc moduleAraq2011-11-181-0/+138
>rw = c->w; c->w = waw - 2 * BORDERPX; c->rh = c->h; c->h = wah - 2 * BORDERPX; } else { c->x = c->rx; c->y = c->ry; c->w = c->rw; c->h = c->rh; } resize(c, True, TopLeft); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } /* extern */ void (*arrange)(void) = DEFMODE; void detach(Client *c) { if(c->prev) c->prev->next = c->next; if(c->next) c->next->prev = c->prev; if(c == clients) clients = c->next; c->next = c->prev = NULL; } void dofloat(void) { Client *c; for(c = clients; c; c = c->next) { if(isvisible(c)) { resize(c, True, TopLeft); } else ban(c); } if(!sel || !isvisible(sel)) { for(c = stack; c && !isvisible(c); c = c->snext); focus(c); } restack(); } void dotile(void) { unsigned int i, n, mpx, stackw, th; Client *c; for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) n++; mpx = (waw * master) / 1000; stackw = waw - mpx; for(i = 0, c = clients; c; c = c->next) if(isvisible(c)) { if(c->isfloat) { resize(c, True, TopLeft); continue; } c->ismax = False; c->x = wax; c->y = way; if(n == 1) { /* only 1 window */ c->w = waw - 2 * BORDERPX; c->h = wah - 2 * BORDERPX; } else if(i == 0) { /* master window */ c->w = waw - stackw - 2 * BORDERPX; c->h = wah - 2 * BORDERPX; th = wah / (n - 1); } else { /* tile window */ c->x += mpx; c->w = stackw - 2 * BORDERPX; if(th > bh) { c->y = way + (i - 1) * th; c->h = th - 2 * BORDERPX; } else /* fallback if th < bh */ c->h = wah - 2 * BORDERPX; } resize(c, False, TopLeft); i++; } else ban(c); if(!sel || !isvisible(sel)) { for(c = stack; c && !isvisible(c); c = c->snext); focus(c); } restack(); } void focusnext(Arg *arg) { Client *c; if(!sel) return; if(!(c = getnext(sel->next))) c = getnext(clients); if(c) { focus(c); restack(); } } void focusprev(Arg *arg) { Client *c; if(!sel) return; if(!(c = getprev(sel->prev))) { for(c = clients; c && c->next; c = c->next); c = getprev(c); } if(c) { focus(c); restack(); } } Bool isvisible(Client *c) { unsigned int i; for(i = 0; i < ntags; i++) if(c->tags[i] && seltag[i]) return True; return False; } void resizemaster(Arg *arg) { if(arg->i == 0) master = MASTER; else { if(master + arg->i > 950 || master + arg->i < 50) return; master += arg->i; } arrange(); } void restack(void) { Client *c; XEvent ev; if(!sel) { drawstatus(); return; } if(sel->isfloat || arrange == dofloat) { XRaiseWindow(dpy, sel->win); XRaiseWindow(dpy, sel->twin); } if(arrange != dofloat) { if(!sel->isfloat) { XLowerWindow(dpy, sel->twin); XLowerWindow(dpy, sel->win); } for(c = nexttiled(clients); c; c = nexttiled(c->next)) { if(c == sel) continue; XLowerWindow(dpy, c->twin); XLowerWindow(dpy, c->win); } } drawall(); XSync(dpy, False); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } void togglemode(Arg *arg) { arrange = (arrange == dofloat) ? dotile : dofloat; if(sel) arrange(); else drawstatus(); } void toggleview(Arg *arg) { unsigned int i; seltag[arg->i] = !seltag[arg->i]; for(i = 0; i < ntags && !seltag[i]; i++); if(i == ntags) seltag[arg->i] = True; /* cannot toggle last view */ arrange(); } void view(Arg *arg) { unsigned int i; for(i = 0; i < ntags; i++) seltag[i] = False; seltag[arg->i] = True; arrange(); } void viewall(Arg *arg) { unsigned int i; for(i = 0; i < ntags; i++) seltag[i] = True; arrange(); } void zoom(Arg *arg) { unsigned int n; Client *c; if(!sel) return; if(sel->isfloat || (arrange == dofloat)) { togglemax(sel); return; } for(n = 0, c = clients; c; c = c->next) if(isvisible(c) && !c->isfloat) n++; if(n < 2 || (arrange == dofloat)) return; if((c = sel) == nexttiled(clients)) if(!(c = nexttiled(c->next))) return; detach(c); if(clients) clients->prev = c; c->next = clients; clients = c; focus(c); arrange(); }