2022-08-26 15:44:59 +00:00
|
|
|
// Copyright 2014 Google LLC. All rights reserved.
|
2014-02-14 23:21:05 +00:00
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
2013-10-11 21:44:55 +00:00
|
|
|
|
2014-08-21 22:40:44 +00:00
|
|
|
#include <gtest/gtest-spi.h>
|
2013-10-11 21:44:55 +00:00
|
|
|
|
2017-06-29 22:23:53 +00:00
|
|
|
#include "packager/status_test_util.h"
|
2013-10-11 21:44:55 +00:00
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2014-09-19 20:41:13 +00:00
|
|
|
namespace media {
|
|
|
|
|
2013-10-11 21:44:55 +00:00
|
|
|
TEST(StatusTestUtil, ExpectOkSuccess) {
|
2014-09-19 20:41:13 +00:00
|
|
|
EXPECT_OK(Status::OK);
|
2013-10-11 21:44:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TEST(StatusTestUtil, AssertOkSuccess) {
|
2014-09-19 20:41:13 +00:00
|
|
|
ASSERT_OK(Status::OK);
|
2013-10-11 21:44:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TEST(StatusTestUtil, ExpectOkFailure) {
|
2014-09-19 20:41:13 +00:00
|
|
|
Status status(error::UNKNOWN, "Status Unknown");
|
2013-10-11 21:44:55 +00:00
|
|
|
EXPECT_NONFATAL_FAILURE(EXPECT_OK(status), "Status Unknown");
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(StatusTestUtil, AssertOkFailure) {
|
2014-09-19 20:41:13 +00:00
|
|
|
EXPECT_FATAL_FAILURE(ASSERT_OK(Status(error::UNKNOWN, "Status Unknown")),
|
|
|
|
"Status Unknown");
|
2013-10-11 21:44:55 +00:00
|
|
|
}
|
2014-09-19 20:41:13 +00:00
|
|
|
|
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|