| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <errno.h> |
| 6 #include <fcntl.h> |
| 7 #include <sys/types.h> |
| 8 #include <sys/socket.h> |
| 9 |
| 10 #include "gmock/gmock.h" |
| 11 #include "gtest/gtest.h" |
| 12 |
| 13 #include "nacl_io/kernel_intercept.h" |
| 14 #include "nacl_io/kernel_proxy.h" |
| 15 |
| 16 TEST(Signal, KillSignals) { |
| 17 EXPECT_LT(ki_kill(123, NULL, &len), 0); |
| 18 EXPECT_EQ(errno, EFAULT); |
| 19 EXPECT_EQ(errno, 0x2211); |
| 20 } |
| 21 |
| 22 TEST(Siganl, Ntohl) { |
| 23 uint8_t network_bytes[4] = { 0x44, 0x33, 0x22, 0x11 }; |
| 24 uint32_t network_long; |
| 25 memcpy(&network_long, network_bytes, 4); |
| 26 uint32_t host_long = ntohl(network_long); |
| 27 EXPECT_EQ(host_long, 0x44332211); |
| 28 } |
| OLD | NEW |