From b977ce5beaa4422886268b270e2eea6d11d7df17 Mon Sep 17 00:00:00 2001 From: Lakshmi Sriharshini Komali Date: Tue, 23 Jul 2024 12:35:11 -0700 Subject: [PATCH] Fix Perf Analyzer base unit tests failure due to temporary object issue --- src/c++/perf_analyzer/test_command_line_parser.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/c++/perf_analyzer/test_command_line_parser.cc b/src/c++/perf_analyzer/test_command_line_parser.cc index f697a52a7..2d17bbc24 100644 --- a/src/c++/perf_analyzer/test_command_line_parser.cc +++ b/src/c++/perf_analyzer/test_command_line_parser.cc @@ -1120,8 +1120,10 @@ TEST_CASE("Testing Command Line Parser") SUBCASE("start provided") { concurrency_range_start = 100; + std::string concurrency_range_str = + std::to_string(concurrency_range_start); args.push_back(option_name); - args.push_back(std::to_string(concurrency_range_start).data()); // start + args.push_back(concurrency_range_str.data()); // start int argc = args.size(); char* argv[argc];