blob: ead5bcba553e504fb4b74fef8e66a8aa813d0c0d [file] [log] [blame]
Jesse Wilsonc981ace2011-06-22 14:17:14 -07001// Copyright 2011 Google Inc. All Rights Reserved.
Ian Rogersb033c752011-07-20 12:22:35 -07002
Brian Carlstrom578bbdc2011-07-21 14:07:47 -07003#include "assembler_x86.h"
Jesse Wilsonc981ace2011-06-22 14:17:14 -07004
Jesse Wilsonc981ace2011-06-22 14:17:14 -07005#include "gtest/gtest.h"
6
Ian Rogersb033c752011-07-20 12:22:35 -07007namespace art {
8
9TEST(AssemblerX86, CreateBuffer) {
10 AssemblerBuffer buffer;
11 AssemblerBuffer::EnsureCapacity ensured(&buffer);
12 buffer.Emit<uint8_t>(0x42);
13 ASSERT_EQ(static_cast<size_t>(1), buffer.Size());
14 buffer.Emit<int32_t>(42);
15 ASSERT_EQ(static_cast<size_t>(5), buffer.Size());
Jesse Wilsonc981ace2011-06-22 14:17:14 -070016}
Ian Rogersb033c752011-07-20 12:22:35 -070017
18} // namespace art