Bug 836182: Make mtransport's gtest invocations be consistent about signedness of arguments. r=jesup
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 30 Jan 2013 07:31:55 -0800
changeset 120377 daa83b83531cd5d54886244f4564cdfbb8bbe14c
parent 120376 7faec6303aa9a53705172ed679732dac65047487
child 120378 920d24c1a157dbf3a05fc598cf0342ef8798d934
push id24251
push userryanvm@gmail.com
push dateThu, 31 Jan 2013 20:56:22 +0000
treeherdermozilla-central@683b08dc1afd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs836182
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 836182: Make mtransport's gtest invocations be consistent about signedness of arguments. r=jesup
media/mtransport/test/ice_unittest.cpp
media/mtransport/test/sctp_unittest.cpp
media/mtransport/test/transport_unittests.cpp
--- a/media/mtransport/test/ice_unittest.cpp
+++ b/media/mtransport/test/ice_unittest.cpp
@@ -309,17 +309,17 @@ class IceTest : public ::testing::Test {
 
     // Wait to see if we crash
     PR_Sleep(PR_MillisecondsToInterval(5000));
   }
 
   void SendReceive() {
     //    p1_->Send(2);
     p1_->SendPacket(0, 1, reinterpret_cast<const unsigned char *>("TEST"), 4);
-    ASSERT_EQ(1, p1_->sent());
+    ASSERT_EQ(1u, p1_->sent());
     ASSERT_TRUE_WAIT(p2_->received() == 1, 1000);
   }
 
  protected:
   bool initted_;
   nsCOMPtr<nsIEventTarget> target_;
   mozilla::ScopedDeletePtr<IceTestPeer> p1_;
   mozilla::ScopedDeletePtr<IceTestPeer> p2_;
--- a/media/mtransport/test/sctp_unittest.cpp
+++ b/media/mtransport/test/sctp_unittest.cpp
@@ -176,17 +176,18 @@ class TransportTestPeer : public sigslot
     info.snd_flags = 0;
     info.snd_ppid = 50;  // What the heck is this?
     info.snd_context = 0;
     info.snd_assoc_id = 0;
 
     int r = usrsctp_sendv(sctp_, buf, sizeof(buf), nullptr, 0,
                           static_cast<void *>(&info),
                           sizeof(info), SCTP_SENDV_SNDINFO, 0);
-    ASSERT_EQ(sizeof(buf), r);
+    ASSERT_TRUE(r >= 0);
+    ASSERT_EQ(sizeof(buf), (size_t)r);
 
     ++sent_;
   }
 
   int sent() const { return sent_; }
   int received() const { return received_; }
   bool connected() const { return connected_; }
 
--- a/media/mtransport/test/transport_unittests.cpp
+++ b/media/mtransport/test/transport_unittests.cpp
@@ -123,17 +123,17 @@ class TransportTestPeer : public sigslot
                    TransportLayerDtls::CLIENT :
                    TransportLayerDtls::SERVER);
 
     nsresult res = identity_->ComputeFingerprint("sha-1",
                                              fingerprint_,
                                              sizeof(fingerprint_),
                                              &fingerprint_len_);
     EXPECT_TRUE(NS_SUCCEEDED(res));
-    EXPECT_EQ(20, fingerprint_len_);
+    EXPECT_EQ(20u, fingerprint_len_);
   }
 
   ~TransportTestPeer() {
     test_utils->sts_target()->Dispatch(
       WrapRunnable(this, &TransportTestPeer::DestroyFlow),
       NS_DISPATCH_SYNC);
   }