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

Side by Side Diff: sandbox/linux/bpf_dsl/codegen_unittest.cc

Issue 1539423002: Revert of Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « sandbox/linux/bpf_dsl/codegen.cc ('k') | sandbox/linux/bpf_dsl/cons.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sandbox/linux/bpf_dsl/codegen.h" 5 #include "sandbox/linux/bpf_dsl/codegen.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
10 #include <map> 7 #include <map>
11 #include <utility> 8 #include <utility>
12 #include <vector> 9 #include <vector>
13 10
14 #include "base/macros.h" 11 #include "base/macros.h"
15 #include "base/md5.h" 12 #include "base/md5.h"
16 #include "base/strings/string_piece.h" 13 #include "base/strings/string_piece.h"
17 #include "sandbox/linux/system_headers/linux_filter.h" 14 #include "sandbox/linux/system_headers/linux_filter.h"
18 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
19 16
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 // Branching again to the same target nodes should require only one 392 // Branching again to the same target nodes should require only one
396 // new instruction, as we can reuse the previous branch's jumps. 393 // new instruction, as we can reuse the previous branch's jumps.
397 CodeGen::Node two = 394 CodeGen::Node two =
398 MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, nodes[0], nodes[1]); 395 MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, nodes[0], nodes[1]);
399 EXPECT_EQ(one + 1, two); // XXX: Implementation detail! 396 EXPECT_EQ(one + 1, two); // XXX: Implementation detail!
400 RunTest(two); 397 RunTest(two);
401 } 398 }
402 399
403 } // namespace 400 } // namespace
404 } // namespace sandbox 401 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/bpf_dsl/codegen.cc ('k') | sandbox/linux/bpf_dsl/cons.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698