Jesse Wilson | c981ace | 2011-06-22 14:17:14 -0700 | [diff] [blame] | 1 | // Copyright 2011 Google Inc. All Rights Reserved. |
Ian Rogers | b033c75 | 2011-07-20 12:22:35 -0700 | [diff] [blame] | 2 | |
Brian Carlstrom | 578bbdc | 2011-07-21 14:07:47 -0700 | [diff] [blame] | 3 | #include "assembler_x86.h" |
Jesse Wilson | c981ace | 2011-06-22 14:17:14 -0700 | [diff] [blame] | 4 | |
Jesse Wilson | c981ace | 2011-06-22 14:17:14 -0700 | [diff] [blame] | 5 | #include "gtest/gtest.h" |
| 6 | |
Ian Rogers | b033c75 | 2011-07-20 12:22:35 -0700 | [diff] [blame] | 7 | namespace art { |
| 8 | |
| 9 | TEST(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 Wilson | c981ace | 2011-06-22 14:17:14 -0700 | [diff] [blame] | 16 | } |
Ian Rogers | b033c75 | 2011-07-20 12:22:35 -0700 | [diff] [blame] | 17 | |
| 18 | } // namespace art |