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

Side by Side Diff: test/cctest/compiler/test-node.cc

Issue 877753007: Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.". (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: VS201x now happy? 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project 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 <functional> 5 #include <functional>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "graph-tester.h" 9 #include "graph-tester.h"
10 #include "src/compiler/node.h" 10 #include "src/compiler/node.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 n2->AppendInput(graph.zone(), n1); // with out-of-line input. 625 n2->AppendInput(graph.zone(), n1); // with out-of-line input.
626 } 626 }
627 627
628 n0->RemoveAllInputs(); 628 n0->RemoveAllInputs();
629 CHECK_EQ(0, n0->InputCount()); 629 CHECK_EQ(0, n0->InputCount());
630 630
631 CHECK_EQ(2, n0->UseCount()); 631 CHECK_EQ(2, n0->UseCount());
632 n1->RemoveAllInputs(); 632 n1->RemoveAllInputs();
633 CHECK_EQ(1, n1->InputCount()); 633 CHECK_EQ(1, n1->InputCount());
634 CHECK_EQ(1, n0->UseCount()); 634 CHECK_EQ(1, n0->UseCount());
635 CHECK_EQ(NULL, n1->InputAt(0)); 635 CHECK(!n1->InputAt(0));
636 636
637 CHECK_EQ(1, n1->UseCount()); 637 CHECK_EQ(1, n1->UseCount());
638 n2->RemoveAllInputs(); 638 n2->RemoveAllInputs();
639 CHECK_EQ(2, n2->InputCount()); 639 CHECK_EQ(2, n2->InputCount());
640 CHECK_EQ(0, n0->UseCount()); 640 CHECK_EQ(0, n0->UseCount());
641 CHECK_EQ(0, n1->UseCount()); 641 CHECK_EQ(0, n1->UseCount());
642 CHECK_EQ(NULL, n2->InputAt(0)); 642 CHECK(!n2->InputAt(0));
643 CHECK_EQ(NULL, n2->InputAt(1)); 643 CHECK(!n2->InputAt(1));
644 } 644 }
645 645
646 { 646 {
647 Node* n0 = graph.NewNode(&dummy_operator); 647 Node* n0 = graph.NewNode(&dummy_operator);
648 Node* n1 = graph.NewNode(&dummy_operator, n0); 648 Node* n1 = graph.NewNode(&dummy_operator, n0);
649 n1->ReplaceInput(0, n1); // self-reference. 649 n1->ReplaceInput(0, n1); // self-reference.
650 650
651 CHECK_EQ(0, n0->UseCount()); 651 CHECK_EQ(0, n0->UseCount());
652 CHECK_EQ(1, n1->UseCount()); 652 CHECK_EQ(1, n1->UseCount());
653 n1->RemoveAllInputs(); 653 n1->RemoveAllInputs();
654 CHECK_EQ(1, n1->InputCount()); 654 CHECK_EQ(1, n1->InputCount());
655 CHECK_EQ(0, n1->UseCount()); 655 CHECK_EQ(0, n1->UseCount());
656 CHECK_EQ(NULL, n1->InputAt(0)); 656 CHECK(!n1->InputAt(0));
657 } 657 }
658 } 658 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-machine-operator-reducer.cc ('k') | test/cctest/compiler/test-node-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698