Test Wrap function with large string input
| 242 | |
| 243 | // Test Wrap function with large string input |
| 244 | void TestWrapLargeStringInput() |
| 245 | { |
| 246 | // Test with very long string that could trigger width calculation issues |
| 247 | std::string long_string(1000, 'a'); |
| 248 | |
| 249 | auto result = args::Wrap(long_string, 80); |
| 250 | test::require(!result.empty()); |
| 251 | std::cout << "PASS: Wrap long string (1000 chars) with width 80" << std::endl; |
| 252 | |
| 253 | // Test with extremely large width |
| 254 | result = args::Wrap(long_string, std::numeric_limits<size_t>::max()); |
| 255 | test::require(result.size() >= 1); |
| 256 | std::cout << "PASS: Wrap long string with SIZE_MAX width" << std::endl; |
| 257 | |
| 258 | // Test with width of 1 |
| 259 | result = args::Wrap(long_string, 1); |
| 260 | test::require(!result.empty()); |
| 261 | std::cout << "PASS: Wrap long string with width 1" << std::endl; |
| 262 | } |
| 263 | |
| 264 | // Main test runner |
| 265 | int main() |