-
Notifications
You must be signed in to change notification settings - Fork 692
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
community/snapcast: fix test failure
- Loading branch information
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
From 411d98f5628f190fa481e86a13e0be184693f095 Mon Sep 17 00:00:00 2001 | ||
From: badaix <johannes.pohl@badaix.de> | ||
Date: Fri, 24 Dec 2021 10:24:21 +0100 | ||
Subject: [PATCH] Fix unit tests | ||
|
||
--- | ||
test/test_main.cpp | 25 ++++++++++++++++++++++--- | ||
1 file changed, 22 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/test/test_main.cpp b/test/test_main.cpp | ||
index 53ae2e3a..926de335 100644 | ||
--- a/test/test_main.cpp | ||
+++ b/test/test_main.cpp | ||
@@ -17,16 +17,23 @@ | ||
***/ | ||
|
||
#define CATCH_CONFIG_MAIN | ||
-#include "catch.hpp" | ||
|
||
-#include <regex> | ||
+// prototype/interface header file | ||
+#include "catch.hpp" | ||
|
||
+// local headers | ||
#include "common/aixlog.hpp" | ||
#include "common/utils/string_utils.hpp" | ||
#include "server/streamreader/control_error.hpp" | ||
#include "server/streamreader/properties.hpp" | ||
#include "server/streamreader/stream_uri.hpp" | ||
|
||
+// 3rd party headers | ||
+ | ||
+// standard headers | ||
+#include <regex> | ||
+ | ||
+ | ||
using namespace std; | ||
|
||
|
||
@@ -129,7 +136,7 @@ TEST_CASE("Metadata") | ||
"contentCreated": "2017-04-07", | ||
"discNumber": 1, | ||
"duration": 247.0, | ||
- "file": "The Chainsmokers - Memories...Do Not Open (2017)/05 - Something Just Like This.mp3", | ||
+ "url": "The Chainsmokers - Memories...Do Not Open (2017)/05 - Something Just Like This.mp3", | ||
"genre": [ | ||
"Dance/Electronic" | ||
], | ||
@@ -173,6 +180,12 @@ TEST_CASE("Properties") | ||
REQUIRE(to_string(PlaybackStatus::kPaused) == "paused"); | ||
auto in_json = json::parse(R"( | ||
{ | ||
+ "canControl": false, | ||
+ "canGoNext": false, | ||
+ "canGoPrevious": false, | ||
+ "canPause": false, | ||
+ "canPlay": false, | ||
+ "canSeek": false, | ||
"playbackStatus": "playing", | ||
"loopStatus": "track", | ||
"shuffle": false, | ||
@@ -193,6 +206,12 @@ TEST_CASE("Properties") | ||
|
||
in_json = json::parse(R"( | ||
{ | ||
+ "canControl": true, | ||
+ "canGoNext": true, | ||
+ "canGoPrevious": true, | ||
+ "canPause": true, | ||
+ "canPlay": true, | ||
+ "canSeek": true, | ||
"volume": 42 | ||
} | ||
)"); |