Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Dec 24, 2021
1 parent f792f80 commit 411d98f
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions test/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand Down Expand Up @@ -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"
],
Expand Down Expand Up @@ -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,
Expand All @@ -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
}
)");
Expand Down

0 comments on commit 411d98f

Please sign in to comment.