Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
thread_system_test_base.h
Go to the documentation of this file.
1 // Copyright 2011 Google Inc.
16 
17 #ifndef PAGESPEED_KERNEL_THREAD_THREAD_SYSTEM_TEST_BASE_H_
18 #define PAGESPEED_KERNEL_THREAD_THREAD_SYSTEM_TEST_BASE_H_
19 
21 
26 
27 namespace net_instaweb {
28 
29 class ThreadSystemTestBase : public testing::Test {
30  public:
32  void set_ok_flag(bool ok) { ok_flag_ = ok; }
33  bool ok_flag() const { return ok_flag_; }
34 
35  ThreadSystem* thread_system() const { return thread_system_.get(); }
36 
37  protected:
39  explicit ThreadSystemTestBase(ThreadSystem* thread_system);
40 
42  void TestStartJoin();
43 
46  void TestSync();
47 
48  private:
49  bool ok_flag_;
50  scoped_ptr<ThreadSystem> thread_system_;
51  MockMessageHandler handler_;
52 
53 
54 };
55 
58 template<typename ToTest>
60  public:
62 };
63 
64 TYPED_TEST_CASE_P(ThreadSystemTestTemplate);
65 
66 TYPED_TEST_P(ThreadSystemTestTemplate, TestStartJoin) {
68 }
69 
70 TYPED_TEST_P(ThreadSystemTestTemplate, TestSync) {
72 }
73 
74 REGISTER_TYPED_TEST_CASE_P(ThreadSystemTestTemplate, TestStartJoin, TestSync);
75 
76 }
77 
78 #endif
Definition: thread_system_test_base.h:29
void set_ok_flag(bool ok)
Data transfer between thread & main.
Definition: thread_system_test_base.h:32
ThreadSystemTestBase(ThreadSystem *thread_system)
Takes ownership of 'thread_system'.
Definition: thread_system_test_base.h:59
void TestStartJoin()
Test simple start & join.