Changeset 122c3b8 in mainline for uspace/lib/cpp/src/internal/test/memory.cpp
- Timestamp:
- 2018-07-05T21:41:24Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 17012fcf
- Parents:
- 8349334
- git-author:
- Dzejrou <dzejrou@…> (2018-05-15 22:21:45)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:24)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/src/internal/test/memory.cpp
r8349334 r122c3b8 87 87 } 88 88 test_eq("unique_ptr move pt2", mock::destructor_calls, 1U); 89 90 mock::clear(); 91 { 92 auto ptr = std::make_unique<mock[]>(10U); 93 test_eq("unique_ptr make_unique array version", mock::constructor_calls, 10U); 94 95 new(&ptr[5]) mock{}; 96 test_eq("placement new into the array", mock::constructor_calls, 11U); 97 test_eq("original not destroyed during placement new", mock::destructor_calls, 0U); 98 } 99 test_eq("unique_ptr array out of scope", mock::destructor_calls, 10U); 89 100 } 90 101 }
Note:
See TracChangeset
for help on using the changeset viewer.