aboutsummaryrefslogtreecommitdiff
path: root/adapters/gtest/results.go
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/gtest/results.go')
-rw-r--r--adapters/gtest/results.go29
1 files changed, 20 insertions, 9 deletions
diff --git a/adapters/gtest/results.go b/adapters/gtest/results.go
index 88e4069..c556749 100644
--- a/adapters/gtest/results.go
+++ b/adapters/gtest/results.go
@@ -6,8 +6,6 @@ import (
"io"
"log"
"time"
-
- "golang.flu0r1ne.net/planr"
)
type gFailure struct {
@@ -48,8 +46,19 @@ type gResults struct {
}
type Result struct {
- id string
- result planr.TestResult
+ id string
+ pass bool
+ failureMsg string
+}
+
+func failureMsg(failures []gFailure) string {
+ failure_msg := ""
+
+ for _, failure := range failures {
+ failure_msg += failure.Failure
+ }
+
+ return failure_msg
}
func decodeResults(r io.Reader) []Result {
@@ -69,13 +78,15 @@ func decodeResults(r io.Reader) []Result {
for _, test := range suite.Testsuite {
n := len(test.Failures)
- decoded = append(decoded, Result{
+
+ res := Result {
id: suite.Name + "." + test.Name,
- result: planr.TestResult {
- Pass: n == 0,
- },
- })
+ pass: n == 0,
+ failureMsg: failureMsg(test.Failures),
+ }
+
+ decoded = append(decoded, res)
}
}