blob: ead5bcba553e504fb4b74fef8e66a8aa813d0c0d [file] [log] [blame]
// Copyright 2011 Google Inc. All Rights Reserved.
#include "assembler_x86.h"
#include "gtest/gtest.h"
namespace art {
TEST(AssemblerX86, CreateBuffer) {
AssemblerBuffer buffer;
AssemblerBuffer::EnsureCapacity ensured(&buffer);
buffer.Emit<uint8_t>(0x42);
ASSERT_EQ(static_cast<size_t>(1), buffer.Size());
buffer.Emit<int32_t>(42);
ASSERT_EQ(static_cast<size_t>(5), buffer.Size());
}
} // namespace art