app: resturn Err() on failed IDs test
[staging/windowmanager.git] / src / app.cpp
index 8a3abec..ebbed02 100644 (file)
@@ -93,10 +93,9 @@ struct result<surface_id_to_layer_map>
                      });
 
       for (auto sid : tests) {
-         DB("layer id for surface "
-            << sid.first << " is "
-            << i.get_layer_for_surface(sid.first).value_or(-1) << " expected "
-            << sid.second);
+         if (i.get_layer_for_surface(sid.first).value_or(-1) != sid.second) {
+            return Err<surface_id_to_layer_map>("ID Map embedded test failed!");
+         }
       }
    }