On the way to move process to endDraw
[apps/agl-service-windowmanager.git] / test / test.cpp
index f56cd2f..46195b6 100644 (file)
@@ -3,7 +3,7 @@
 #include <gtest/gtest.h>
 #include <memory>
 #include "applist.hpp"
-#include "windowmanager-client.hpp"
+#include "wm_client.hpp"
 
 // テストグループの定義 TEST_GROUP(group)
 // フィクスチャの準備
@@ -92,7 +92,9 @@ TEST_F(reqtest, allocate_sequence)
   bool result = app_list.requestFinished();
   EXPECT_EQ(false, result);
 
-  result = app_list.setAction(seq1, test1, test_role, test_area);
+  auto trg = app_list.getRequest(seq1);
+
+  result = app_list.setAction(seq1, trg.appid, trg.role, trg.area);
   result &= app_list.setAction(seq1, test3, test_role, test_area);
   EXPECT_EQ(true, result);
 
@@ -112,6 +114,14 @@ TEST_F(reqtest, allocate_sequence)
   result = app_list.endDrawFullfilled(current);
   EXPECT_EQ(true, result);
 
+  auto actions = app_list.getActions(current);
+  EXPECT_EQ(test1, actions[0].appid);
+  EXPECT_EQ(test_role, actions[0].role);
+  EXPECT_EQ(test_area, actions[0].area);
+  EXPECT_EQ(test3, actions[1].appid);
+  EXPECT_EQ(test_role, actions[1].role);
+  EXPECT_EQ(test_area, actions[1].area);
+
   app_list.removeRequest(current);
   /* lookup_seq_err = app_list.lookUpAllocatingApp(test1);
   EXPECT_EQ(0, lookup_seq_err); */