summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* ARC: misc bugfixes (#13156)Andreas Rumpf2020-01-152-0/+210
| | | | | | | | * fixes #13102 * closes #13149 * ARC: fixes a move optimizer bug (there are more left regarding array and tuple indexing) * proper fix; fixes #12957 * fixes yet another case object '=' code generation problem
* fixes #9674 [backport] (#13143)Andreas Rumpf2020-01-141-1/+9
|
* fixes #13105 (#13138)Andreas Rumpf2020-01-141-0/+18
|
* fixes #13119 (#13128)Andreas Rumpf2020-01-142-2/+14
| | | | | * fixes #13119 * fixes a regression
* fixes #13112 (#13127)Andreas Rumpf2020-01-131-0/+6
| | | | | | * improve line error information * fixes #13112
* fixes #13122 (#13126)Andreas Rumpf2020-01-133-4/+13
| | | | | | * fixes #13122 * moved tests to where they belong
* fix rtti sizeof for varargs in global scope (#13125) [backport]Jasper Jenkins2020-01-131-0/+9
|
* VM FFI: write(stderr, msg) and fprintf(cstderr, msg) now work at CT (#13083)Timothee Cour2020-01-121-0/+13
|
* more arc features (#13098)Andreas Rumpf2020-01-101-0/+25
| | | | | * config update * ARC now supports 'repr' and 'new' with finalizers is supported
* typetraits: fixes #6454; genericParams; added lenTuple; added tuple type get ↵Timothee Cour2020-01-101-4/+14
| | | | | | (#13064)
* fixes #13070Araq2020-01-101-0/+40
|
* distinctBase type trait for distinct types (#13031)cooldome2020-01-083-38/+65
|
* clean up deprecated stuff and unused imports in tests (#13059)Miran2020-01-077-15/+14
|
* Continue #13002 (#13021)Clyybber2020-01-061-1/+1
|
* [cleanup] remove disabled (and obsolete) ttypetraits; rename ttypetraits2 => ↵Timothee Cour2020-01-052-102/+41
| | | | | | | | ttypetraits (#13041) * remove disabled (and obsolete) ttypetraits; rename ttypetraits2 => ttypetraits * D20200105T085828 fix super strange bug that causes CI to fail: builds.sr.ht with: `Error: Settle timed out after 120 attempts`
* Rst parser respect `:start-after:` and `:end-before:` in `include` directive ↵Kamanji2020-01-051-0/+79
| | | | | | | | | | | | | (#12972) * [FEATURE] rst parser respect :start-after: in include Rst parser now respects `:start-after:` and `:end-before:` attributes for `include` directive. * [DOC] include directive parsing proc update * [TEST] Added unit tests for include rst directive in `rst` module
* fixes #13013, reverts previous changes to readLines() (#13036) [backport]cooldome2020-01-051-1/+1
| | | | | | | * Revert "remove default argument for readLines (#12807) [backport]" This reverts commit c949b81efdeb08b38224e1678ad140b7b7663b15.
* fix enumtostr crash for enum-range (#13035)Jasper Jenkins2020-01-051-0/+12
|
* fixes #12964 (#13027)Andreas Rumpf2020-01-041-0/+14
|
* Fixes #13026 (#13028)cooldome2020-01-041-1/+83
|
* fixes #12961 (#13019)Andreas Rumpf2020-01-031-0/+11
|
* fixes #12978 (#13012)Andreas Rumpf2020-01-031-1/+24
|
* remove default argument for readLines (#12807) [backport]cooldome2020-01-021-1/+1
|
* Sink to MemMove optimization in injectdestructors (#13002)cooldome2020-01-021-1/+1
|
* --exception:goto switch for deterministic exception handling (#12977)Andreas Rumpf2020-01-015-2/+264
| | | | | This implements "deterministic" exception handling for Nim based on goto instead of setjmp. This means raising an exception is much cheaper than in C++'s table based implementations. Supports hard realtime systems. Default for --gc:arc and the C target because it's generally a good idea and arc is all about deterministic behavior. Note: This implies that fatal runtime traps are not catchable anymore! This needs to be documented.
* fixes #12989 (#12992)cooldome2019-12-312-1/+10
| | | | | | | * fixes #12989 * Revert "remove unwanted changes" This reverts commit 501829732a8e44deef2d815c303859efbe452cb5.
* fixes #12965 (#12991)Andreas Rumpf2019-12-311-0/+4
|
* Revert "fixes #12989"Andrii Riabushenko2019-12-311-9/+0
| | | | This reverts commit 928c2fee06bd11a0901c5f563b4953788be76ae6.
* fixes #12989Andrii Riabushenko2019-12-311-0/+9
|
* fixes #12945 (#12959)cooldome2019-12-241-2/+2
|
* fixes a test caseAraq2019-12-241-1/+3
|
* fixes #12826Araq2019-12-241-0/+33
|
* lenVarargs: number of varargs elements (#12907)Timothee Cour2019-12-231-0/+59
|
* case coverage error message for `char` (#12948)Jasper Jenkins2019-12-221-3/+9
|
* Fix #12785 (#12943)RSDuck2019-12-211-0/+47
| | | | | | * Fix #12785 and add test * better variable name
* fix #12919 tasyncclosestall flaky: Address already in use (#12934)Timothee Cour2019-12-191-1/+3
|
* Better case coverage error message for alias and range enum (#12913)Jasper Jenkins2019-12-183-3/+40
|
* fixes #12899 (#12921)Andreas Rumpf2019-12-182-3/+27
| | | | | | * fixes #12899 * fixes regression: destroy global variables in reverse declaration order, closureleak test relies on it
* ARC: cycle detector (#12823)Andreas Rumpf2019-12-1718-33/+328
| | | | | | | | | | | | | * first implementation of the =trace and =dispose hooks for the cycle collector * a cycle collector for ARC: progress * manual: the .acyclic pragma is a thing once again * gcbench: adaptations for --gc:arc * enable valgrind tests for the strutils tests * testament: better valgrind support * ARC refactoring: growable jumpstacks * ARC cycle detector: non-recursive algorithm * moved and renamed core/ files back to system/ * refactoring: --gc:arc vs --gc:orc since 'orc' is even more experimental and we want to ship --gc:arc soonish
* allow typed/untyped in magic procs (#12911)Timothee Cour2019-12-171-2/+10
|
* fixes #12885 [backport] (#12895)Andreas Rumpf2019-12-132-2/+14
|
* Fixes #12883 (#12894)cooldome2019-12-131-1/+34
| | | | | | | | | | * fixes #12883 * fix comment * add normalize * fix
* fixes #12882 (#12889)cooldome2019-12-131-0/+18
| | | | * fixes #12882
* ARC: fixes cycle detection and move the .cursor attribute into closures (#12872)Andreas Rumpf2019-12-111-0/+54
|
* Increased TInstr field sizes: allow long jumps and 65535 VM registers (#12777)Ico Doornekamp2019-12-102-0/+30
| | | | | | | | | * Increased regBx size from 16 to 24 bits to increase jump range in the VM from 32K to 8M instructions. Fixes #12727 * Increased VM TInst register field sizes to 16 bits to allow up to 65535 VM registers per proc * Added test case for >255 VM registers
* ARC: yet another bugfix (#12871)Andreas Rumpf2019-12-101-0/+11
|
* introduce capture macro (#12712)Judd2019-12-101-0/+12
| | | | capture works for more cases than `closureScope`.
* fixes #12827 (#12829) [backport]cooldome2019-12-101-0/+17
|
* fixes #12820 (#12828)cooldome2019-12-091-0/+7
|
* Assigning template to var/let/const gives a proper error (#12851)Neelesh Chandola2019-12-093-2/+15
| | | | | | * Assigning template to var/let/const gives a proper error * Fix style
an class="w"> protos; } for(i = 0; i < res; i++) { if(protocols[i] == wm_atom[WMDelete]) protos |= WM_PROTOCOL_DELWIN; } free((char *) protocols); return protos; } void send_message(Window w, Atom a, long value) { XEvent e; e.type = ClientMessage; e.xclient.window = w; e.xclient.message_type = a; e.xclient.format = 32; e.xclient.data.l[0] = value; e.xclient.data.l[1] = CurrentTime; XSendEvent(dpy, w, False, NoEventMask, &e); XFlush(dpy); } /* * There's no way to check accesses to destroyed windows, thus * those cases are ignored (especially on UnmapNotify's). * Other types of errors call Xlib's default error handler, which * calls exit(). */ int error_handler(Display *dpy, XErrorEvent *error) { if(error->error_code == BadWindow || (error->request_code == X_SetInputFocus && error->error_code == BadMatch) || (error->request_code == X_PolyText8 && error->error_code == BadDrawable) || (error->request_code == X_PolyFillRectangle && error->error_code == BadDrawable) || (error->request_code == X_PolySegment && error->error_code == BadDrawable) || (error->request_code == X_ConfigureWindow && error->error_code == BadMatch) || (error->request_code == X_GrabKey && error->error_code == BadAccess)) return 0; fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n", error->request_code, error->error_code); return x_error_handler(dpy, error); /* may call exit() */ } /* * Startup Error handler to check if another window manager * is already running. */ static int startup_error_handler(Display *dpy, XErrorEvent *error) { other_wm_running = True; return -1; } static void cleanup() { while(sel) { resize(sel, True); unmanage(sel); } XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); } void quit(Arg *arg) { running = False; } int main(int argc, char *argv[]) { int i, n; fd_set rd; XSetWindowAttributes wa; unsigned int mask; Window w; XEvent ev; for(i = 1; (i < argc) && (argv[i][0] == '-'); i++) { switch (argv[i][1]) { case 'v': fprintf(stdout, "%s", version); exit(0); break; default: usage(); break; } } dpy = XOpenDisplay(0); if(!dpy) error("dwm: cannot connect X server\n"); screen = DefaultScreen(dpy); root = RootWindow(dpy, screen); /* check if another WM is already running */ other_wm_running = False; XSetErrorHandler(startup_error_handler); /* this causes an error if some other WM is running */ XSelectInput(dpy, root, SubstructureRedirectMask); XFlush(dpy); if(other_wm_running) error("dwm: another window manager is already running\n"); XSetErrorHandler(0); x_error_handler = XSetErrorHandler(error_handler); /* init atoms */ wm_atom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); wm_atom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); net_atom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); net_atom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); XChangeProperty(dpy, root, net_atom[NetSupported], XA_ATOM, 32, PropModeReplace, (unsigned char *) net_atom, NetLast); /* init cursors */ cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr); cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing); cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); update_keys(); /* style */ dc.bg = initcolor(BGCOLOR); dc.fg = initcolor(FGCOLOR); dc.border = initcolor(BORDERCOLOR); initfont(FONT); sx = sy = 0; sw = DisplayWidth(dpy, screen); sh = DisplayHeight(dpy, screen); mw = (sw * MASTERW) / 100; wa.override_redirect = 1; wa.background_pixmap = ParentRelative; wa.event_mask = ButtonPressMask | ExposureMask; bx = by = 0; bw = sw; dc.h = bh = dc.font.height + 4; barwin = XCreateWindow(dpy, root, bx, by, bw, bh, 0, DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); XDefineCursor(dpy, barwin, cursor[CurNormal]); XMapRaised(dpy, barwin); dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen)); dc.gc = XCreateGC(dpy, root, 0, 0); draw_bar(); issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); wa.event_mask = SubstructureRedirectMask | EnterWindowMask \ | LeaveWindowMask; wa.cursor = cursor[CurNormal]; XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); strcpy(stext, "dwm-"VERSION); scan_wins(); /* main event loop, reads status text from stdin as well */ Mainloop: while(running) { FD_ZERO(&rd); FD_SET(STDIN_FILENO, &rd); FD_SET(ConnectionNumber(dpy), &rd); i = select(ConnectionNumber(dpy) + 1, &rd, 0, 0, 0); if(i == -1 && errno == EINTR) continue; if(i < 0) error("select failed\n"); else if(i > 0) { if(FD_ISSET(ConnectionNumber(dpy), &rd)) { while(XPending(dpy)) { XNextEvent(dpy, &ev); if(handler[ev.type]) (handler[ev.type])(&ev); /* call handler */ } } if(FD_ISSET(STDIN_FILENO, &rd)) { i = n = 0; for(;;) { if((i = getchar()) == EOF) { stext[0] = 0; goto Mainloop; } if(i == '\n' || n >= sizeof(stext) - 1) break; stext[n++] = i; } stext[n] = 0; draw_bar(); } } } cleanup(); XCloseDisplay(dpy); return 0; }