Permalink
Browse files

whitespace cleanup

  • Loading branch information...
1 parent dd85c92 commit e035b036b0b67dc39af3c21a6b8ddf93ec1d03a4 @cgay cgay committed Nov 1, 2012
View
@@ -37,16 +37,16 @@ define method do-benchmark
let bench-arguments = maybe-trap-errors(argument-function());
case
instance?(name, <error>) =>
- record-benchmark("[*** Invalid name ***]", name, name, #f, #f, #f, #f);
+ record-benchmark("[*** Invalid name ***]", name, name, #f, #f, #f, #f);
instance?(bench-arguments, <error>) =>
- record-benchmark(name, bench-arguments, bench-arguments, #f, #f, #f, #f);
+ record-benchmark(name, bench-arguments, bench-arguments, #f, #f, #f, #f);
otherwise =>
- let function = bench-arguments[0];
- let arguments = bench-arguments[1];
+ let function = bench-arguments[0];
+ let arguments = bench-arguments[1];
let result = #f;
let status = #f;
profiling (cpu-time-seconds, cpu-time-microseconds, allocation)
- result := maybe-trap-errors(apply(function, arguments));
+ result := maybe-trap-errors(apply(function, arguments));
results
status := if (~result)
#"failed"
@@ -64,8 +64,8 @@ define method do-benchmark
status
end case;
exception (r :: <simple-restart>,
- init-arguments: vector(format-string:, "Skip this benchmark",
- format-arguments:, #[]))
+ init-arguments: vector(format-string:, "Skip this benchmark",
+ format-arguments:, #[]))
#"failed"
end block;
end method do-benchmark;
View
@@ -104,29 +104,29 @@ define method do-check
let check-arguments = maybe-trap-errors(argument-function());
case
instance?(name, <error>) =>
- record-check("[*** Invalid name ***]", name, name, #f);
+ record-check("[*** Invalid name ***]", name, name, #f);
instance?(check-arguments, <error>) =>
- record-check(name, check-arguments, check-arguments, #f);
+ record-check(name, check-arguments, check-arguments, #f);
otherwise =>
- let function = check-arguments[0];
- let arguments = check-arguments[1];
- let result = maybe-trap-errors(apply(function, arguments));
- let status :: <result-status>
- = if (~result)
- #"failed"
- elseif (instance?(result, <error>))
- result
- else
- #"passed"
- end if;
- if (status == #"failed" & debug-failures?())
- break("Check failed: %s", name)
- end if;
- record-check(name, status, function, arguments)
+ let function = check-arguments[0];
+ let arguments = check-arguments[1];
+ let result = maybe-trap-errors(apply(function, arguments));
+ let status :: <result-status>
+ = if (~result)
+ #"failed"
+ elseif (instance?(result, <error>))
+ result
+ else
+ #"passed"
+ end if;
+ if (status == #"failed" & debug-failures?())
+ break("Check failed: %s", name)
+ end if;
+ record-check(name, status, function, arguments)
end case;
exception (r :: <simple-restart>,
- init-arguments: vector(format-string:, "Skip this check",
- format-arguments:, #[]))
+ init-arguments: vector(format-string:, "Skip this check",
+ format-arguments:, #[]))
#"failed"
end block;
end method do-check;
@@ -319,5 +319,3 @@ define method record-check
operation: operation, value: value));
status
end method record-check;
-
-
View
@@ -70,8 +70,8 @@ define method perform-component
maybe-execute-component(component, options)
end;
display-results(result,
- report-function: report-function,
- report-format-function: report-format-function);
+ report-function: report-function,
+ report-format-function: report-format-function);
result;
end method perform-component;
@@ -101,10 +101,9 @@ define method maybe-execute-component
end;
let (subresults, perform-status)
= if (execute-component?(component, options))
- execute-component(component, options)
+ execute-component(component, options)
else
- values(#(), #"not-executed")
+ values(#(), #"not-executed")
end;
make-result(component, subresults, perform-status)
end method maybe-execute-component;
-
@@ -21,14 +21,14 @@ define module gui-testworks
use duim;
export <progress-window>,
- *progress-window*,
- gui-progress-display-message,
- gui-progress-clear-all-messages,
- gui-progress-pause,
- gui-progress-pause-with-check-name,
- gui-announce-function,
- start-progress-window,
- exit-progress-window,
- gui-perform-suite,
- gui-perform-test;
+ *progress-window*,
+ gui-progress-display-message,
+ gui-progress-clear-all-messages,
+ gui-progress-pause,
+ gui-progress-pause-with-check-name,
+ gui-announce-function,
+ start-progress-window,
+ exit-progress-window,
+ gui-perform-suite,
+ gui-perform-test;
end module gui-testworks;
@@ -35,10 +35,10 @@ define frame <progress-window> (<simple-frame>)
columns: 2, spacing: 2,
x-alignment: #[#"left", #"left"], y-alignment: #"top",
contents:
- vector(
- vector(make(<label>, label: "Suite:"), frame.progress-suite-name),
- vector(make(<label>, label: "Test:"), frame.progress-test-name),
- vector(make(<label>, label: "Check:"), frame.progress-check-name)
+ vector(
+ vector(make(<label>, label: "Suite:"), frame.progress-suite-name),
+ vector(make(<label>, label: "Test:"), frame.progress-test-name),
+ vector(make(<label>, label: "Check:"), frame.progress-check-name)
));
labelling ("Information:") frame.progress-information end;
horizontally (spacing: 2)
@@ -59,19 +59,19 @@ define frame <progress-window> (<simple-frame>)
constant slot progress-information :: <text-editor> = make-text-editor();
constant slot progress-continue-button :: <push-button>
= make(<push-button>, label: "&Continue", enabled?: #f, default?: #t,
- documentation: "Continue with test run after a pause",
- activate-callback: gui-progress-continue-callback);
+ documentation: "Continue with test run after a pause",
+ activate-callback: gui-progress-continue-callback);
/*
constant slot progress-step-out-button :: <push-button>
= make(<push-button>, label: "&Step Out", enabled?: #f,
- documentation:
+ documentation:
"Step out of the current test or suite by signalling an error",
- activate-callback: gui-progress-step-out-callback);
+ activate-callback: gui-progress-step-out-callback);
*/
constant slot progress-close-button :: <push-button>
= make(<push-button>, label: "C&lose",
- documentation: "Close progress window (test run will continue)",
- activate-callback: gui-progress-close-callback);
+ documentation: "Close progress window (test run will continue)",
+ activate-callback: gui-progress-close-callback);
constant slot progress-paused-lock :: <semaphore> = make(<semaphore>);
// slot progress-exit-component? :: <boolean> = #f;
keyword title: = $progress-window-name;
@@ -113,11 +113,11 @@ define function gui-progress-display-message (kind, message :: <string>)
let frame = *progress-window*;
let name-gadget
= select (kind)
- <suite> => progress-suite-name;
- <test> => progress-test-name;
- #"check" => progress-check-name;
+ <suite> => progress-suite-name;
+ <test> => progress-test-name;
+ #"check" => progress-check-name;
#"information" => progress-information;
- otherwise => #f;
+ otherwise => #f;
end;
when (frame & name-gadget)
gadget-text(frame.name-gadget) := message;
@@ -211,19 +211,19 @@ define method gui-perform-suite
(suite :: <suite>,
#rest args,
#key announce-function = gui-announce-function,
- announce-checks? = #t,
+ announce-checks? = #t,
#all-keys)
=> (result :: <component-result>)
block ()
start-progress-window();
dynamic-bind
(*announce-check-function* = gui-progress-pause-with-check-name)
apply
- (perform-suite,
- suite,
- announce-function: announce-function,
- announce-checks?: announce-checks?,
- args)
+ (perform-suite,
+ suite,
+ announce-function: announce-function,
+ announce-checks?: announce-checks?,
+ args)
end
cleanup
exit-progress-window();
@@ -234,19 +234,19 @@ define method gui-perform-test
(test :: <test>,
#rest args,
#key announce-function = gui-announce-function,
- announce-checks? = #t,
+ announce-checks? = #t,
#all-keys)
=> (result :: <component-result>)
block ()
start-progress-window();
dynamic-bind
(*announce-check-function* = gui-progress-pause-with-check-name)
apply
- (perform-test,
- test,
- announce-function: announce-function,
- announce-checks?: announce-checks?,
- args)
+ (perform-test,
+ test,
+ announce-function: announce-function,
+ announce-checks?: announce-checks?,
+ args)
end
cleanup
exit-progress-window();
Oops, something went wrong.

0 comments on commit e035b03

Please sign in to comment.