-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADDING MORE TEST FOR std::string ON ALL PLATFORMS #15
Conversation
source/stdcpp/test/string.d
Outdated
auto b = std_string("Hi, this is a test for string capacity growth for a length more than the base SSO"); | ||
assert(b.capacity == stringCapacity("Hi, this is a test for string capacity growth for a length more than the base SSO")); | ||
a.swap(b); // a and b swaps | ||
assert(a.capacity == stringCapacity("Hi, this is a test for string capacity growth for a length more than the base SSO")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto b = std_string("Hi, this is a test for string capacity growth for a length more than the base SSO"); | |
assert(b.capacity == stringCapacity("Hi, this is a test for string capacity growth for a length more than the base SSO")); | |
a.swap(b); // a and b swaps | |
assert(a.capacity == stringCapacity("Hi, this is a test for string capacity growth for a length more than the base SSO")); | |
immutable LongStr = "Hi, this is a test for string capacity growth for a length more than the base SSO"; | |
auto b = std_string(LongStr); | |
assert(b.capacity == stringCapacity(LongStr.ptr)); | |
a.swap(b); // a and b swaps | |
assert(a.capacity == stringCapacity(LongStr.ptr)); |
source/stdcpp/test/string.d
Outdated
assert(a.empty == 0); | ||
a.clear(); | ||
assert(a.empty == 1); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? Unecessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, why would you have trailing whitespace ?
25167bd
to
4be1786
Compare
4be1786
to
4298bcb
Compare
No description provided.