summary refs log tree commit diff stats
path: root/tests/generics
Commit message (Expand)AuthorAgeFilesLines
* 32 bit fixes (#10608)Arne Döring2019-02-131-0/+2
* Propagate tfGcSafe flag to generic instantiations (#10620)LemonBoy2019-02-131-0/+11
* Fix for issue #10342. better message for generic subclass instantiation (#10354)Ray Imber2019-01-222-1/+12
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) ...Timothee Cour2019-01-081-1/+1
* megatest: make it green on LinuxAraq2018-12-113-4/+3
* make more tests greenAraq2018-12-112-36/+8
* testament: joinable is now an explicit concept of a test specAndreas Rumpf2018-12-111-0/+3
* Testament: refactoring; makes the test joiner greenAraq2018-12-116-2/+10
* lots of small changesArne Döring2018-12-114-4/+4
* megatest checks output and nimoutArne Döring2018-12-114-133/+127
* require errormsg to be specified before file.Arne Döring2018-12-116-16/+3
* cleanup tests; don't use non-working 'msg' spec fieldAraq2018-11-231-1/+1
* updated tests to be executedArne Döring2018-11-232-2/+13
* make run the default action of a test in testerArne Döring2018-11-232-1/+13
* disable some tests for the C++ target; refs #7870Araq2018-11-151-9/+10
* adopt testsArne Döring2018-11-081-1/+1
* More descriptive names of test files (#9531)Miran2018-10-293-6/+8
* -5/+5
* fix #6928; fix #7208Zahary Karadjov2018-06-161-0/+21
* fixes #7222; fixes #5595; fixes #3747Zahary Karadjov2018-06-161-0/+124
* fix #7653Zahary Karadjov2018-06-101-1/+3
* Fix type inference with static literals.LemonBoy2018-06-101-0/+12
* Bugfix: The compiler were not inserting proper downcasts for generic typesZahary Karadjov2018-05-072-1/+21
* fixes #7247Andreas Rumpf2018-02-231-6/+15
* make more tests greenAraq2018-02-102-2/+2
* better type inference for numerical types; prerequisitive for version 1Andreas Rumpf2018-02-021-0/+12
* Improved collection-to-string behavior (#6825)Fabian Keller2017-12-141-2/+2
* make tests green againAndreas Rumpf2017-11-181-0/+1
* Remove expr/stmt (#5857)Arne Döring2017-07-254-5/+5
* close #5106Zahary Karadjov2017-06-201-0/+61
* close #5756Zahary Karadjov2017-06-201-0/+30
* fix #5864Zahary Karadjov2017-06-201-0/+14
* Fix #5962Zahary Karadjov2017-06-201-0/+81
ass="p">.resize(App.screen.width, App.screen.height, App.screen.flags) run.set_window_position_from_settings(Settings) Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right, font, Settings.font_height, math.floor(Settings.font_height*1.3)) Editor_state.filename = Settings.filename Editor_state.screen_top1 = Settings.screen_top Editor_state.cursor1 = Settings.cursor end function run.set_window_position_from_settings(settings) local os = love.system.getOS() if os == 'Linux' then -- love.window.setPosition doesn't quite seem to do what is asked of it on Linux. App.screen.move(settings.x, settings.y-37, settings.displayindex) else App.screen.move(settings.x, settings.y, settings.displayindex) end end function run.initialize_default_settings() local font_height = 20 local font = love.graphics.newFont(font_height) run.initialize_window_geometry() Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right, font, font_height, math.floor(font_height*1.3)) Settings = run.settings() end function run.initialize_window_geometry() -- Initialize window width/height and make window resizable. -- -- I get tempted to have opinions about window dimensions here, but they're -- non-portable: -- - maximizing doesn't work on mobile and messes things up -- - maximizing keeps the title bar on screen in Linux, but off screen on -- Windows. And there's no way to get the height of the title bar. -- It seems more robust to just follow LÖVE's default window size until -- someone overrides it. App.screen.width, App.screen.height, App.screen.flags = App.screen.size() App.screen.flags.resizable = true App.screen.resize(App.screen.width, App.screen.height, App.screen.flags) end function run.resize(w, h) --? print(("Window resized to width: %d and height: %d."):format(w, h)) App.screen.width, App.screen.height = w, h Text.redraw_all(Editor_state) Editor_state.selection1 = {} -- no support for shift drag while we're resizing Editor_state.right = App.screen.width-Margin_right Editor_state.width = Editor_state.right-Editor_state.left Text.tweak_screen_top_and_cursor(Editor_state, Editor_state.left, Editor_state.right) end function run.file_drop(file) -- first make sure to save edits on any existing file if Editor_state.next_save then save_to_disk(Editor_state) end -- clear the slate for the new file App.initialize_globals() Editor_state.filename = file:getFilename() file:open('r') Editor_state.lines = load_from_file(file) file:close() Text.redraw_all(Editor_state) Editor_state.screen_top1 = {line=1, pos=1} Editor_state.cursor1 = {line=1, pos=1} -- keep a few blank lines around: https://merveilles.town/@akkartik/110084833821965708 love.window.setTitle('text.love - '..Editor_state.filename) end function run.draw() edit.draw(Editor_state) end function run.update(dt) Cursor_time = Cursor_time + dt edit.update(Editor_state, dt) end function run.quit() edit.quit(Editor_state) end function run.settings() if Settings == nil then Settings = {} end Settings.x, Settings.y, Settings.displayindex = App.screen.position() return { x=Settings.x, y=Settings.y, displayindex=Settings.displayindex, width=App.screen.width, height=App.screen.height, font_height=Editor_state.font_height, filename=absolutize(Editor_state.filename), screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1 } end function absolutize(path) if is_relative_path(path) then return App.current_dir..path end return path end function run.mouse_press(x,y, mouse_button) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.mouse_press(Editor_state, x,y, mouse_button) end function run.mouse_release(x,y, mouse_button) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.mouse_release(Editor_state, x,y, mouse_button) end function run.mouse_wheel_move(dx,dy) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.mouse_wheel_move(Editor_state, dx,dy) end function run.text_input(t) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.text_input(Editor_state, t) end function run.keychord_press(chord, key) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.keychord_press(Editor_state, chord, key) end function run.key_release(key, scancode) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.key_release(Editor_state, key, scancode) end function width(s) return love.graphics.getFont():getWidth(s) end