self-documenting 0 Test_right_margin

[?]
Sep 7, 2022, 5:16 PM
2WGHUWE6DWRNUD7AJNLGT4I6PZ2EIVDQCZ7V7V7WSYPBRPYUUDUQC

Dependencies

  • [2] KKMFQDR4 editing source code from within the app
  • [3] CNCYMM6A make test initializations a little more obvious
  • [4] OI4FPFIN support drawings in the source editor
  • [5] APYPFFS3 call edit rather than App callbacks in tests
  • [6] V7LATJC7 bugfix: resize
  • [7] H6QZ7GRR more precise name
  • [8] CE4LZV4T drop last couple of manual tests
  • [*] 2L5MEZV3 experiment: new edit namespace

Change contents

  • edit in source_tests.lua at line 10
    [2.147586]
    [2.147586]
    check_eq(Editor_state.right, 300 - Test_margin_right, 'F - test_resize_window/baseline/left_margin')
  • edit in source_tests.lua at line 12
    [2.147609]
    [2.147609]
    -- ugly; resize switches to real, non-test margins
  • replacement in source_tests.lua at line 15
    [2.147743][2.147743:147882]()
    check_eq(Editor_state.left, Test_margin_left, 'F - test_resize_window/left_margin')
    -- ugly; right margin switches from 0 after resize
    [2.147743]
    [2.147882]
    check_eq(Editor_state.left, Margin_left, 'F - test_resize_window/left_margin')
  • replacement in source_tests.lua at line 17
    [2.147970][2.147970:148076]()
    check_eq(Editor_state.width, 200-Test_margin_left-Margin_right, 'F - test_resize_window/drawing_width')
    [2.147970]
    [2.148076]
    check_eq(Editor_state.width, 200-Margin_left-Margin_right, 'F - test_resize_window/drawing_width')
  • edit in source_edit.lua at line 518
    [2.164222]
    [2.164222]
    -- Insulate tests from some key globals so I don't have to change the vast
    -- majority of tests when they're modified for the real app.
  • edit in source_edit.lua at line 521
    [2.164244]
    [2.164244]
    Test_margin_right = 0
  • replacement in source_edit.lua at line 528
    [2.164422][2.164422:164467]()
    App.screen.width, -- right margin = 0
    [2.164422]
    [2.164467]
    App.screen.width - Test_margin_right,
  • edit in run_tests.lua at line 9
    [3.4513]
    [3.309]
    check_eq(Editor_state.right, 300 - Test_margin_right, 'F - test_resize_window/baseline/left_margin')
  • edit in run_tests.lua at line 11
    [3.332]
    [3.332]
    -- ugly; resize switches to real, non-test margins
  • replacement in run_tests.lua at line 14
    [3.466][3.4514:4653]()
    check_eq(Editor_state.left, Test_margin_left, 'F - test_resize_window/left_margin')
    -- ugly; right margin switches from 0 after resize
    [3.466]
    [3.401]
    check_eq(Editor_state.left, Margin_left, 'F - test_resize_window/left_margin')
  • replacement in run_tests.lua at line 16
    [3.489][3.4654:4760]()
    check_eq(Editor_state.width, 200-Test_margin_left-Margin_right, 'F - test_resize_window/drawing_width')
    [3.489]
    [3.466]
    check_eq(Editor_state.width, 200-Margin_left-Margin_right, 'F - test_resize_window/drawing_width')
  • edit in edit.lua at line 468
    [3.5400]
    [3.5400]
    -- Insulate tests from some key globals so I don't have to change the vast
    -- majority of tests when they're modified for the real app.
  • edit in edit.lua at line 471
    [3.5422]
    [3.5422]
    Test_margin_right = 0
  • replacement in edit.lua at line 478
    [3.5600][3.5600:5645]()
    App.screen.width, -- right margin = 0
    [3.5600]
    [3.5645]
    App.screen.width - Test_margin_right,