Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: command_buffer/client/cross/cmd_buffer_helper_test.cc

Issue 208037: Added command buffer unit tests to gyp.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/common.gypi ('k') | command_buffer/client/cross/id_allocator_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 if (parser_get > parser_put) { 93 if (parser_get > parser_put) {
94 // "busy" buffer wraps, so "free" buffer is between put (inclusive) and 94 // "busy" buffer wraps, so "free" buffer is between put (inclusive) and
95 // get (exclusive). 95 // get (exclusive).
96 EXPECT_LE(parser_put, put); 96 EXPECT_LE(parser_put, put);
97 EXPECT_GT(parser_get, limit); 97 EXPECT_GT(parser_get, limit);
98 } else { 98 } else {
99 // "busy" buffer does not wrap, so the "free" buffer is the top side (from 99 // "busy" buffer does not wrap, so the "free" buffer is the top side (from
100 // put to the limit) and the bottom side (from 0 to get). 100 // put to the limit) and the bottom side (from 0 to get).
101 if (put >= parser_put) { 101 if (put >= parser_put) {
102 // we're on the top side, check we are below the limit. 102 // we're on the top side, check we are below the limit.
103 EXPECT_GE(10, limit); 103 EXPECT_GE(10U, limit);
104 } else { 104 } else {
105 // we're on the bottom side, check we are below get. 105 // we're on the bottom side, check we are below get.
106 EXPECT_GT(parser_get, limit); 106 EXPECT_GT(parser_get, limit);
107 } 107 }
108 } 108 }
109 } 109 }
110 110
111 CommandBufferHelper *helper() { return helper_.get(); } 111 CommandBufferHelper *helper() { return helper_.get(); }
112 CommandBufferEngine *engine() { return engine_.get(); } 112 CommandBufferEngine *engine() { return engine_.get(); }
113 AsyncAPIMock *api_mock() { return api_mock_.get(); } 113 AsyncAPIMock *api_mock() { return api_mock_.get(); }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // Check that the commands did happen. 267 // Check that the commands did happen.
268 Mock::VerifyAndClearExpectations(api_mock()); 268 Mock::VerifyAndClearExpectations(api_mock());
269 269
270 // Check the error status. 270 // Check the error status.
271 ASSERT_EQ(BufferSyncInterface::PARSING, engine()->GetStatus()); 271 ASSERT_EQ(BufferSyncInterface::PARSING, engine()->GetStatus());
272 EXPECT_EQ(BufferSyncInterface::PARSE_NO_ERROR, engine()->GetParseError()); 272 EXPECT_EQ(BufferSyncInterface::PARSE_NO_ERROR, engine()->GetParseError());
273 } 273 }
274 274
275 } // namespace command_buffer 275 } // namespace command_buffer
276 } // namespace o3d 276 } // namespace o3d
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | command_buffer/client/cross/id_allocator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698