Skip to content

Commit

Permalink
Test for explicitly defaulted constructors.
Browse files Browse the repository at this point in the history
Relates to #815.
  • Loading branch information
adetaylor committed Oct 25, 2022
1 parent 6cca9b2 commit f3a8030
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions integration-tests/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9964,6 +9964,13 @@ fn test_implicit_constructor_rules() {
void a() const {}
};
struct AllExplicitlyDefaulted {
AllExplicitlyDefaulted() = default;
AllExplicitlyDefaulted(const AllExplicitlyDefaulted&) = default;
AllExplicitlyDefaulted(AllExplicitlyDefaulted&&) = default;
void a() const {};
};
struct PublicDeleted {
PublicDeleted() = delete;
PublicDeleted(const PublicDeleted&) = delete;
Expand Down Expand Up @@ -10505,6 +10512,12 @@ fn test_implicit_constructor_rules() {
test_movable![ffi::AllImplicitlyDefaulted];
test_call_a![ffi::AllImplicitlyDefaulted];

test_constructible![ffi::AllExplicitlyDefaulted];
test_make_unique![ffi::AllExplicitlyDefaulted];
test_copyable![ffi::AllExplicitlyDefaulted];
test_movable![ffi::AllExplicitlyDefaulted];
test_call_a![ffi::AllExplicitlyDefaulted];

test_call_a![ffi::PublicDeleted];

test_copyable![ffi::PublicDeletedDefault];
Expand Down Expand Up @@ -10878,6 +10891,7 @@ fn test_implicit_constructor_rules() {
rs,
&[
"AllImplicitlyDefaulted",
"AllExplicitlyDefaulted",
"PublicDeleted",
"PublicDeletedDefault",
"PublicDeletedCopy",
Expand Down

0 comments on commit f3a8030

Please sign in to comment.