OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 TransformationContext* transformation_context_; | 57 TransformationContext* transformation_context_; |
58 Pack *pack_; | 58 Pack *pack_; |
59 }; | 59 }; |
60 | 60 |
61 void DrawPassTest::SetUp() { | 61 void DrawPassTest::SetUp() { |
62 transformation_context_ = new TransformationContext(g_service_locator); | 62 transformation_context_ = new TransformationContext(g_service_locator); |
63 pack_ = object_manager_->CreatePack(); | 63 pack_ = object_manager_->CreatePack(); |
64 } | 64 } |
65 | 65 |
66 void DrawPassTest::TearDown() { | 66 void DrawPassTest::TearDown() { |
67 pack_->Destroy(); | 67 object_manager_->DestroyPack(pack_); |
68 delete transformation_context_; | 68 delete transformation_context_; |
69 } | 69 } |
70 | 70 |
71 TEST_F(DrawPassTest, Basic) { | 71 TEST_F(DrawPassTest, Basic) { |
72 DrawPass* draw_pass = pack()->Create<DrawPass>(); | 72 DrawPass* draw_pass = pack()->Create<DrawPass>(); |
73 // Check that draw_pass got created. | 73 // Check that draw_pass got created. |
74 EXPECT_TRUE(draw_pass != NULL); | 74 EXPECT_TRUE(draw_pass != NULL); |
75 | 75 |
76 // Check that the default parameters got created. | 76 // Check that the default parameters got created. |
77 EXPECT_TRUE(draw_pass->GetParam<ParamDrawList>( | 77 EXPECT_TRUE(draw_pass->GetParam<ParamDrawList>( |
78 DrawPass::kDrawListParamName) != NULL); | 78 DrawPass::kDrawListParamName) != NULL); |
79 EXPECT_TRUE(draw_pass->GetParam<ParamInteger>( | 79 EXPECT_TRUE(draw_pass->GetParam<ParamInteger>( |
80 DrawPass::kSortMethodParamName) != NULL); | 80 DrawPass::kSortMethodParamName) != NULL); |
81 } | 81 } |
82 } // namespace o3d | 82 } // namespace o3d |
OLD | NEW |