OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 param.current_value = 34; | 144 param.current_value = 34; |
145 param.rpc_message_id = 21; | 145 param.rpc_message_id = 21; |
146 buffer_rpc_impl()->DoCall(BufferRPCImpl::SIGNAL_GET_CHANGES, ¶m, | 146 buffer_rpc_impl()->DoCall(BufferRPCImpl::SIGNAL_GET_CHANGES, ¶m, |
147 sizeof(param), NULL, 0); | 147 sizeof(param), NULL, 0); |
148 } | 148 } |
149 | 149 |
150 // Checks that the GET_STATUS RPC is properly parsed and that the return value | 150 // Checks that the GET_STATUS RPC is properly parsed and that the return value |
151 // is properly forwarded. | 151 // is properly forwarded. |
152 TEST_F(BufferRPCImplTest, TestGetStatus) { | 152 TEST_F(BufferRPCImplTest, TestGetStatus) { |
153 EXPECT_CALL(buffer_sync_mock(), GetStatus()) | 153 EXPECT_CALL(buffer_sync_mock(), GetStatus()) |
154 .WillOnce(Return(BufferSyncInterface::PARSE_ERROR)); | 154 .WillOnce(Return(BufferSyncInterface::kParseError)); |
155 EXPECT_EQ(BufferSyncInterface::PARSE_ERROR, | 155 EXPECT_EQ(BufferSyncInterface::kParseError, |
156 buffer_rpc_impl()->DoCall(BufferRPCImpl::GET_STATUS, NULL, 0, NULL, | 156 buffer_rpc_impl()->DoCall(BufferRPCImpl::GET_STATUS, NULL, 0, NULL, |
157 0)); | 157 0)); |
158 } | 158 } |
159 | 159 |
160 // Checks that the GET_STATUS RPC is properly parsed and that the return value | 160 // Checks that the GET_STATUS RPC is properly parsed and that the return value |
161 // is properly forwarded. | 161 // is properly forwarded. |
162 TEST_F(BufferRPCImplTest, TestGetParseError) { | 162 TEST_F(BufferRPCImplTest, TestGetParseError) { |
163 EXPECT_CALL(buffer_sync_mock(), GetParseError()) | 163 EXPECT_CALL(buffer_sync_mock(), GetParseError()) |
164 .WillOnce(Return(BufferSyncInterface::PARSE_OUT_OF_BOUNDS)); | 164 .WillOnce(Return(BufferSyncInterface::kParseOutOfBounds)); |
165 EXPECT_EQ(BufferSyncInterface::PARSE_OUT_OF_BOUNDS, | 165 EXPECT_EQ(BufferSyncInterface::kParseOutOfBounds, |
166 buffer_rpc_impl()->DoCall(BufferRPCImpl::GET_PARSE_ERROR, NULL, 0, | 166 buffer_rpc_impl()->DoCall(BufferRPCImpl::GET_PARSE_ERROR, NULL, 0, |
167 NULL, 0)); | 167 NULL, 0)); |
168 } | 168 } |
169 | 169 |
170 } // namespace command_buffer | 170 } // namespace command_buffer |
171 } // namespace o3d | 171 } // namespace o3d |
OLD | NEW |