about summary refs log tree commit diff stats
path: root/html/003trace.cc.html
Commit message (Expand)AuthorAgeFilesLines
* 7476Kartik Agaram2020-12-301-1/+1
* 6958Kartik Agaram2020-10-051-283/+283
* 6084Kartik Agaram2020-03-061-2/+2
* 5893Kartik Agaram2020-01-141-87/+88
* 5806Kartik Agaram2019-12-091-327/+329
* 5490Kartik Agaram2019-07-271-15/+15
* 5485 - promote SubX to top-levelKartik Agaram2019-07-271-426/+511
* 4891Kartik Agaram2018-12-301-0/+1
* 4890 - new html renderingsKartik Agaram2018-12-291-15/+10
* 4814Kartik Agaram2018-12-011-66/+70
* 4709Kartik Agaram2018-10-171-276/+275
* 4588Kartik Agaram2018-09-221-186/+190
* 4539Kartik Agaram2018-09-071-4/+4
* 4447Kartik Agaram2018-07-271-329/+348
* 4239Kartik Agaram2018-05-081-10/+10
* 4199Kartik K. Agaram2018-01-251-65/+64
* 4161Kartik K. Agaram2017-12-151-9/+9
* 4155Kartik K. Agaram2017-12-071-288/+290
* 4134 - 'input' = 'ingredient'Kartik K. Agaram2017-12-031-1/+1
* 4102Kartik K. Agaram2017-11-011-25/+24
* 3971Kartik K. Agaram2017-08-191-1/+1
* 3927Kartik K. Agaram2017-06-191-216/+228
* 3897 - various updates to documentationKartik K. Agaram2017-05-291-6/+6
* 3764 - better colors for cross-linksKartik K. Agaram2017-03-081-4/+5
* 3761Kartik K. Agaram2017-03-071-63/+64
* 3751Kartik K. Agaram2017-03-021-2/+2
* 3750Kartik K. Agaram2017-03-021-373/+365
* 3749Kartik K. Agaram2017-03-021-407/+405
* 3716Kartik K. Agaram2016-12-261-0/+2
* 3713 - cross-link calls with definitions in htmlKartik K. Agaram2016-12-261-56/+56
* 3710Kartik K. Agaram2016-12-261-411/+411
* 3709 - line numbers in htmlKartik K. Agaram2016-12-261-414/+438
* 3679Kartik K. Agaram2016-11-171-4/+8
* 3667Kartik K. Agaram2016-11-111-0/+3
* 3627 - selective dumping a single labelKartik K. Agaram2016-11-051-1/+5
* 3561Kartik K. Agaram2016-10-221-2/+3
* 3544Kartik K. Agaram2016-10-221-1/+1
* 3543Kartik K. Agaram2016-10-221-5/+1
* 3524Kartik K. Agaram2016-10-201-6/+8
* 3371Kartik K. Agaram2016-09-161-4/+5
* 3315Kartik K. Agaram2016-09-101-79/+85
* 3266Kartik K. Agaram2016-08-271-1/+2
* 3219Kartik K. Agaram2016-08-171-0/+12
* 3102Kartik K. Agaram2016-07-051-25/+30
* 2996Kartik K. Agaram2016-05-211-0/+3
* 2812Kartik K. Agaram2016-03-271-12/+21
* 2744Kartik K. Agaram2016-03-091-4/+4
* 2743Kartik K. Agaram2016-03-091-97/+89
* 2706 - update htmlKartik K. Agaram2016-02-251-20/+15
* 2605Kartik K. Agaram2016-01-261-1/+11
class="n">attrset = raise_ok self.assertRaises(OK, disp.color, 'a', 'b') self.assertRaises(OK, disp.color_at, 0, 0, 0, 'a', 'b') self.assertRaises(OK, disp.color_reset) def test_focused_object(self): d1 = Displayable(**self.initdict) d2 = DisplayableContainer(**self.initdict) for obj in (Displayable(**self.initdict) for x in range(5)): d2.add_child(obj) d3 = DisplayableContainer(**self.initdict) for obj in (Displayable(**self.initdict) for x in range(5)): d3.add_child(obj) for obj in (d1, d2, d3): self.disc.add_child(obj) d3.container[3].focused = True self.assertEqual(self.disc._get_focused_obj(), d3.container[3]) d3.container[3].focused = False d2.container[0].focused = True self.assertEqual(self.disc._get_focused_obj(), d2.container[0]) gWin = None class TestDisplayableWithCurses(unittest.TestCase): def setUp(self): global gWin if not gWin: gWin = curses.initscr() self.win = gWin curses.cbreak() curses.noecho() curses.start_color() curses.use_default_colors() self.fm = Fake() self.env = Fake() self.settings = Fake() self.initdict = {'win': self.win, 'settings': self.settings, 'fm': self.fm, 'env': self.env} self.disp = Displayable(**self.initdict) self.disc = DisplayableContainer(**self.initdict) self.disc.add_child(self.disp) self.env.termsize = self.win.getmaxyx() def tearDown(self): self.disp.destroy() curses.nocbreak() curses.echo() curses.endwin() @TODO def test_boundaries(self): disp = self.disp hei, wid = self.env.termsize self.assertRaises(ValueError, disp.resize, 0, 0, hei + 1, wid) self.assertRaises(ValueError, disp.resize, 0, 0, hei, wid + 1) self.assertRaises(ValueError, disp.resize, -1, 0, hei, wid) self.assertRaises(ValueError, disp.resize, 0, -1, hei, wid) for i in range(1000): box = [int(randint(0, hei) * 0.2), int(randint(0, wid) * 0.2)] box.append(randint(0, hei - box[0])) box.append(randint(0, wid - box[1])) def in_box(y, x): return (y >= box[1] and y < box[1] + box[3]) and \ (x >= box[0] and x < box[0] + box[2]) disp.resize(*box) self.assertEqual(box, [disp.y, disp.x, disp.hei, disp.wid], "Resizing failed for some reason on loop " + str(i)) for y, x in zip(range(10), range(10)): is_in_box = in_box(y, x) point1 = (y, x) self.assertEqual(is_in_box, point1 in disp) point2 = Fake() point2.x = x point2.y = y self.assertEqual(is_in_box, point2 in disp) def test_click(self): self.disp.click = raise_ok hei, wid = self.env.termsize for i in range(50): winwid = randint(2, wid-1) winhei = randint(2, hei-1) self.disc.resize(0, 0, hei, wid) self.disp.resize(0, 0, winhei, winwid) fakepos = Fake() fakepos.x = winwid - 2 fakepos.y = winhei - 2 self.assertRaises(OK, self.disc.click, fakepos) fakepos.x = winwid fakepos.y = winhei self.disc.click(fakepos) if __name__ == '__main__': unittest.main()