get rid of dubious heuristic helper

[?]
Jan 24, 2023, 4:16 AM
A3Z3S62K7DVN5F4J46A6A4FE6AMBBCGT2A44L6F34GSTM5EFOTBAC

Dependencies

  • [2] FHRFVEJV tweak format again
  • [3] 2NTKHMLG configurable error handler when running tests
  • [4] 5ZCQGZP5 save 2 more alternate formats for test failures
  • [5] CZQ3NJ4N Merge text0
  • [6] ARYMNK52 merge bugfix: show test failures
  • [7] AVTNUQYR basic test-enabled framework
  • [8] 3QMTXKWN rename
  • [9] 36Z442IV back to commit 8123959e52f without code editing
  • [10] JNJ4R56X support running tests multiple times
  • [11] ORRSP7FV deduce test names on failures
  • [12] TSV3KPBR tweak format of test failures
  • [*] 3QNOKBFM beginnings of a test harness

Change contents

  • replacement in app.lua at line 72
    [4.33][3.18:72]()
    App.run_tests(record_error_with_heuristic_location)
    [4.33]
    [4.1829]
    App.run_tests(record_error)
  • edit in app.lua at line 453
    [4.395][4.395:534](),[4.268][4.60839:60966](),[4.534][4.60839:60966](),[4.60839][4.60839:60966](),[4.60966][4.95:222](),[4.222][2.18:115](),[2.115][4.61148:61188](),[4.313][4.61148:61188](),[4.61148][4.61148:61188]()
    end
    -- Test_errors will be an array
    -- add test_name and guess at file/line
    function record_error_with_heuristic_location(test_name, err)
    local err_without_line_number = err:gsub('^[^:]*:[^:]*: ', '')
    local stack_trace = debug.traceback('', --[[stack frame]]5)
    local file_and_line_number = stack_trace:gsub('stack traceback:\n', ''):gsub(': .*', '') --[[strip newline and tab]] :sub(3)
    local full_error = test_name..' -- '..err_without_line_number..' ('..file_and_line_number..')'
    table.insert(Test_errors, full_error)