[Scummvm-git-logs] scummvm master -> 07478b38bee6f4c3be3f4b22136cf0b83502356c
rvanlaar
noreply at scummvm.org
Thu Oct 6 14:13:27 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
07478b38be TESTS: plug memory leaks in span tests
Commit: 07478b38bee6f4c3be3f4b22136cf0b83502356c
https://github.com/scummvm/scummvm/commit/07478b38bee6f4c3be3f4b22136cf0b83502356c
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-10-06T16:12:27+02:00
Commit Message:
TESTS: plug memory leaks in span tests
Declare dataPtr as a byte pointer instead of a void pointer to
be able to delete it at the end of the test.
Changed paths:
test/common/span.h
diff --git a/test/common/span.h b/test/common/span.h
index 3396c23b40d..ca181c64876 100644
--- a/test/common/span.h
+++ b/test/common/span.h
@@ -327,9 +327,10 @@ public:
{
TS_ASSERT_EQUALS((bool)owner, true);
- void *dataPtr = owner->data();
+ byte *dataPtr = owner->data();
TS_ASSERT_EQUALS(owner.release(), dataPtr);
TS_ASSERT_EQUALS((bool)owner, false);
+ delete[] dataPtr;
}
}
@@ -401,9 +402,10 @@ public:
{
TS_ASSERT_EQUALS((bool)owner, true);
- void *dataPtr = owner->data();
+ byte *dataPtr = owner->data();
TS_ASSERT_EQUALS(owner.release(), dataPtr);
TS_ASSERT_EQUALS((bool)owner, false);
+ delete[] dataPtr;
}
}
More information about the Scummvm-git-logs
mailing list