mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-09 06:11:45 +02:00
Fix unit tests
This commit is contained in:
parent
f792f80423
commit
411d98f562
1 changed files with 22 additions and 3 deletions
|
@ -17,16 +17,23 @@
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
|
|
||||||
|
// prototype/interface header file
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include <regex>
|
// local headers
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/utils/string_utils.hpp"
|
#include "common/utils/string_utils.hpp"
|
||||||
#include "server/streamreader/control_error.hpp"
|
#include "server/streamreader/control_error.hpp"
|
||||||
#include "server/streamreader/properties.hpp"
|
#include "server/streamreader/properties.hpp"
|
||||||
#include "server/streamreader/stream_uri.hpp"
|
#include "server/streamreader/stream_uri.hpp"
|
||||||
|
|
||||||
|
// 3rd party headers
|
||||||
|
|
||||||
|
// standard headers
|
||||||
|
#include <regex>
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
@ -129,7 +136,7 @@ TEST_CASE("Metadata")
|
||||||
"contentCreated": "2017-04-07",
|
"contentCreated": "2017-04-07",
|
||||||
"discNumber": 1,
|
"discNumber": 1,
|
||||||
"duration": 247.0,
|
"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": [
|
"genre": [
|
||||||
"Dance/Electronic"
|
"Dance/Electronic"
|
||||||
],
|
],
|
||||||
|
@ -173,6 +180,12 @@ TEST_CASE("Properties")
|
||||||
REQUIRE(to_string(PlaybackStatus::kPaused) == "paused");
|
REQUIRE(to_string(PlaybackStatus::kPaused) == "paused");
|
||||||
auto in_json = json::parse(R"(
|
auto in_json = json::parse(R"(
|
||||||
{
|
{
|
||||||
|
"canControl": false,
|
||||||
|
"canGoNext": false,
|
||||||
|
"canGoPrevious": false,
|
||||||
|
"canPause": false,
|
||||||
|
"canPlay": false,
|
||||||
|
"canSeek": false,
|
||||||
"playbackStatus": "playing",
|
"playbackStatus": "playing",
|
||||||
"loopStatus": "track",
|
"loopStatus": "track",
|
||||||
"shuffle": false,
|
"shuffle": false,
|
||||||
|
@ -193,6 +206,12 @@ TEST_CASE("Properties")
|
||||||
|
|
||||||
in_json = json::parse(R"(
|
in_json = json::parse(R"(
|
||||||
{
|
{
|
||||||
|
"canControl": true,
|
||||||
|
"canGoNext": true,
|
||||||
|
"canGoPrevious": true,
|
||||||
|
"canPause": true,
|
||||||
|
"canPlay": true,
|
||||||
|
"canSeek": true,
|
||||||
"volume": 42
|
"volume": 42
|
||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue