v8/test/unittests/compiler/opcodes-unittest.cc
bmeurer b6c7e11c10 [turbofan] Fix typo in IrOpcode::Mnemonic.
TEST=unittests
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/843043002

Cr-Commit-Position: refs/heads/master@{#26014}
2015-01-09 14:20:03 +00:00

26 lines
667 B
C++

// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <cstring>
#include "src/compiler/opcodes.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace internal {
namespace compiler {
TEST(IrOpcodeTest, Mnemonic) {
EXPECT_STREQ("UnknownOpcode",
IrOpcode::Mnemonic(static_cast<IrOpcode::Value>(123456789)));
#define OPCODE(Opcode) \
EXPECT_STREQ(#Opcode, IrOpcode::Mnemonic(IrOpcode::k##Opcode));
ALL_OP_LIST(OPCODE)
#undef OPCODE
}
} // namespace compiler
} // namespace internal
} // namespace v8