Ignore:
Timestamp:
01/28/10 16:21:51 (2 years ago)
Author:
dom
Message:

File and line is now provided for test failures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/text_printer.erl

    r87 r92  
    4343            testing (Device); 
    4444        {_, tester, Other} -> 
    45             Line = io_lib: fwrite ("~nError: ~p.\n", [Other]), 
    46             io: put_chars (Device, Line), 
     45            Error = dict: fetch (error, Other), 
     46            Stack = dict: fetch (stack_trace, Other), 
     47            {M, F, A, File, Line} = dict: fetch (location, Other), 
     48            Output = io_lib: fwrite ( 
     49                     "~n~s(~p): failure in {~p, ~p, ~p}~n" 
     50                     "   Error: ~p~n" 
     51                     "   Stack: ~p~n", [File, Line, M, F, A, Error, Stack]), 
     52            io: put_chars (Device, Output), 
    4753            testing (Device) 
    4854    end. 
Note: See TracChangeset for help on using the changeset viewer.