Browse code

Default testing move and copy, not rigourous test

oscar authored on 11/02/2021 20:13:30
Showing 2 changed files

... ...
@@ -14,6 +14,7 @@
14 14
 class Shader {
15 15
 public:
16 16
 
17
+    Shader() = default;
17 18
     Shader(std::vector<std::string> paths, std::string name = "");
18 19
     Shader(Shader &&);
19 20
     Shader(Shader const &);
... ...
@@ -80,6 +80,16 @@ void test() {
80 80
         "good.vert",
81 81
         "good.frag",
82 82
     });
83
+
84
+    Shader shaderMove;
85
+    Shader shaderCopy;
86
+
87
+    std::cout << "Moving shader" << std::endl;
88
+    shaderMove = Shader({"test.vert", "test.frag"});
89
+
90
+    std::cout << "Copying shader" << std::endl;
91
+    shaderCopy = shaderMove;
92
+
83 93
     shader.use();
84 94
     shader.validate();
85 95