add  unit struct testing.
@@ -28,6 +28,9 @@ pub struct BigStruct {
d: usize,
}
+#[derive(Diff, Debug, Clone, PartialEq, Default)]
+struct TestUnit;
+
#[test]
fn test_traditional_struct() {
let t = Test { a: 10 };
@@ -175,3 +178,18 @@ fn test_big_tuple() {
assert_eq!(expected, res);
}
+
+#[test]
+fn test_unit() {
+ let t = TestUnit;
+
+ let t2 = TestUnit;
+
+ let diff = t.diff(&t2);
+
+ let res = t.merge(diff);
+
+ let expected = TestUnit;
+
+ assert_eq!(expected, res);
+}
