Move rtc_api_unittests into rtc_unittests.
This avoids adding an additional test target. Plus, everything in rtc_api_unittests is (and likely will be) simple utility classes akin to what's already being tested in rtc_unittests. BUG=None TBR=kjellander@webrtc.org Review-Url: https://codereview.webrtc.org/2709573003 Cr-Commit-Position: refs/heads/master@{#16819}
This commit is contained in:
@ -374,6 +374,7 @@ if (rtc_include_tests) {
|
||||
rtc_test("rtc_unittests") {
|
||||
testonly = true
|
||||
deps = [
|
||||
"api:rtc_api_unittests",
|
||||
"base:rtc_base_approved_unittests",
|
||||
"base:rtc_base_unittests",
|
||||
"base:rtc_numerics_unittests",
|
||||
|
||||
@ -201,9 +201,8 @@ if (rtc_include_tests) {
|
||||
}
|
||||
}
|
||||
|
||||
rtc_test("rtc_api_unittests") {
|
||||
rtc_source_set("rtc_api_unittests") {
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"rtcerror_unittest.cc",
|
||||
]
|
||||
@ -215,14 +214,7 @@ if (rtc_include_tests) {
|
||||
|
||||
deps = [
|
||||
":libjingle_peerconnection_api",
|
||||
"../base:rtc_base_tests_main",
|
||||
"../base:rtc_base_tests_utils",
|
||||
"../system_wrappers:metrics_default",
|
||||
"../test:test_support",
|
||||
"//webrtc/test:test_support",
|
||||
]
|
||||
|
||||
if (is_android) {
|
||||
deps += [ "//testing/android/native_test:native_test_support" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,8 +233,17 @@ class RTCErrorOr {
|
||||
RTCErrorOr& operator=(const RTCErrorOr& other) = delete;
|
||||
|
||||
// Move constructor and move-assignment operator.
|
||||
RTCErrorOr(RTCErrorOr&& other) = default;
|
||||
RTCErrorOr& operator=(RTCErrorOr&& other) = default;
|
||||
//
|
||||
// Visual Studio doesn't support "= default" with move constructors or
|
||||
// assignment operators (even though they compile, they segfault), so define
|
||||
// them explicitly.
|
||||
RTCErrorOr(RTCErrorOr&& other)
|
||||
: error_(std::move(other.error_)), value_(std::move(other.value_)) {}
|
||||
RTCErrorOr& operator=(RTCErrorOr&& other) {
|
||||
error_ = std::move(other.error_);
|
||||
value_ = std::move(other.value_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Conversion constructor and assignment operator; T must be copy or move
|
||||
// constructible from U.
|
||||
|
||||
@ -22,8 +22,12 @@ struct MoveOnlyInt {
|
||||
MoveOnlyInt() {}
|
||||
explicit MoveOnlyInt(int value) : value(value) {}
|
||||
MoveOnlyInt(const MoveOnlyInt& other) = delete;
|
||||
MoveOnlyInt(MoveOnlyInt&& other) = default;
|
||||
MoveOnlyInt& operator=(MoveOnlyInt&& other) = default;
|
||||
MoveOnlyInt& operator=(const MoveOnlyInt& other) = delete;
|
||||
MoveOnlyInt(MoveOnlyInt&& other) : value(other.value) {}
|
||||
MoveOnlyInt& operator=(MoveOnlyInt&& other) {
|
||||
value = other.value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
int value = kDefaultMoveOnlyIntValue;
|
||||
};
|
||||
@ -34,8 +38,12 @@ struct MoveOnlyInt2 {
|
||||
MoveOnlyInt2() {}
|
||||
explicit MoveOnlyInt2(int value) : value(value) {}
|
||||
MoveOnlyInt2(const MoveOnlyInt2& other) = delete;
|
||||
MoveOnlyInt2(MoveOnlyInt2&& other) = default;
|
||||
MoveOnlyInt2& operator=(MoveOnlyInt2&& other) = default;
|
||||
MoveOnlyInt2& operator=(const MoveOnlyInt2& other) = delete;
|
||||
MoveOnlyInt2(MoveOnlyInt2&& other) : value(other.value) {}
|
||||
MoveOnlyInt2& operator=(MoveOnlyInt2&& other) {
|
||||
value = other.value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
explicit MoveOnlyInt2(MoveOnlyInt&& other) : value(other.value) {}
|
||||
MoveOnlyInt2& operator=(MoveOnlyInt&& other) {
|
||||
|
||||
Reference in New Issue
Block a user