mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-09-14 22:30:00 +00:00
improve test readability for self tests under rake.
This commit is contained in:
@@ -445,7 +445,7 @@ typedef UNITY_FLOAT_TYPE UNITY_FLOAT;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*-------------------------------------------------------
|
/*-------------------------------------------------------
|
||||||
* Internal Structs Needed
|
* Internal Types Needed
|
||||||
*-------------------------------------------------------*/
|
*-------------------------------------------------------*/
|
||||||
|
|
||||||
typedef void (*UnityTestFunction)(void);
|
typedef void (*UnityTestFunction)(void);
|
||||||
|
|||||||
+23
-4
@@ -299,11 +299,30 @@ module RakefileHelpers
|
|||||||
# Verify outputs seem to have happened
|
# Verify outputs seem to have happened
|
||||||
failures = 0
|
failures = 0
|
||||||
output = output.each_line.map do |line|
|
output = output.each_line.map do |line|
|
||||||
if line =~ /Element.*Expected.*Was/ && !(line =~ /Element \d+ Expected \S+ Was \S+/)
|
if (line =~ /Element.*Expected.*Was/)
|
||||||
failures += 1
|
if !(line =~ /Element \d+ Expected \S+ Was \S+/) &&
|
||||||
line + " [[[[ OUTPUT FAILED TO PRINT CORRECTLY ]]]]"
|
!(line =~ /Element \d+ Expected "[^"]+" Was "[^"]+"/)
|
||||||
|
failures += 1
|
||||||
|
"[FAIL] " + line
|
||||||
|
else
|
||||||
|
"[p ] " + line
|
||||||
|
end
|
||||||
|
elsif (line =~ /Expected.*Was/)
|
||||||
|
if !(line =~ /Expected \S+ Was \S+/) &&
|
||||||
|
!(line =~ /Expected "[^"]+" Was "[^"]+"/)
|
||||||
|
failures += 1
|
||||||
|
"[FAIL] " + line
|
||||||
|
else
|
||||||
|
"[p ] " + line
|
||||||
|
end
|
||||||
|
elsif (line =~ /:PASS$/)
|
||||||
|
"[p ] " + line
|
||||||
|
elsif (line =~ /:FAIL$/)
|
||||||
|
"[FAIL] " + line
|
||||||
|
elsif (line =~ /:IGNORE$/)
|
||||||
|
"[i---] " + line
|
||||||
else
|
else
|
||||||
line
|
"[ ] " + line
|
||||||
end
|
end
|
||||||
end.join
|
end.join
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user