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

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

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « sandbox/linux/bpf_dsl/codegen.cc ('k') | sandbox/linux/bpf_dsl/dump_bpf.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/seccomp-bpf/codegen.h" 5 #include "sandbox/linux/bpf_dsl/codegen.h"
6 6
7 #include <linux/filter.h> 7 #include <linux/filter.h>
8 8
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/md5.h" 14 #include "base/md5.h"
15 #include "base/strings/string_piece.h" 15 #include "base/strings/string_piece.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 // Branching again to the same target nodes should require only one 394 // Branching again to the same target nodes should require only one
395 // new instruction, as we can reuse the previous branch's jumps. 395 // new instruction, as we can reuse the previous branch's jumps.
396 CodeGen::Node two = 396 CodeGen::Node two =
397 MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, nodes[0], nodes[1]); 397 MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, nodes[0], nodes[1]);
398 EXPECT_EQ(one + 1, two); // XXX: Implementation detail! 398 EXPECT_EQ(one + 1, two); // XXX: Implementation detail!
399 RunTest(two); 399 RunTest(two);
400 } 400 }
401 401
402 } // namespace 402 } // namespace
403 } // namespace sandbox 403 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/bpf_dsl/codegen.cc ('k') | sandbox/linux/bpf_dsl/dump_bpf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698