| Index: snapshot/win/cpu_context_win_test.cc
|
| diff --git a/snapshot/win/cpu_context_win_test.cc b/snapshot/win/cpu_context_win_test.cc
|
| index 99d7c928bb78f92634b031c6cb6a2bd61ea9d203..b318bd9a689b84059d8e72ca195fb72b9df40df1 100644
|
| --- a/snapshot/win/cpu_context_win_test.cc
|
| +++ b/snapshot/win/cpu_context_win_test.cc
|
| @@ -43,9 +43,25 @@ TEST(CPUContextWin, InitializeX64Context) {
|
| }
|
| }
|
|
|
| -#else // ARCH_CPU_X86_64
|
| +#else
|
| +
|
| +TEST(CPUContextWin, InitializeX86Context) {
|
| + CONTEXT context = {0};
|
| + context.Eax = 1;
|
| + context.ExtendedRegisters[4] = 2; // FTW.
|
| + context.Dr0 = 3;
|
| +
|
| + // Test the simple case, where everything in the CPUContextX86 argument is
|
| + // set directly from the supplied thread, float, and debug state parameters.
|
| + {
|
| + CPUContextX86 cpu_context_x86 = {};
|
| + InitializeX86Context(context, &cpu_context_x86);
|
| + EXPECT_EQ(1u, cpu_context_x86.eax);
|
| + EXPECT_EQ(2u, cpu_context_x86.fxsave.ftw);
|
| + EXPECT_EQ(3u, cpu_context_x86.dr0);
|
| + }
|
| +}
|
|
|
| -#error ARCH_CPU_X86
|
|
|
| #endif // ARCH_CPU_X86_64
|
|
|
|
|