From 98c0e0d3f7778ec20ab7e62f67c2edc03aa392f7 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Mon, 16 Apr 2018 14:26:09 +1200 Subject: [PATCH] apitest: Extend copyassign1 to test std::move() This should ensure that any move constructors and move assignment operators that are added at least compile and pass a simple test. --- xapian-core/tests/generate-api_generated | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xapian-core/tests/generate-api_generated b/xapian-core/tests/generate-api_generated index 629e935a9..333896ea2 100755 --- a/xapian-core/tests/generate-api_generated +++ b/xapian-core/tests/generate-api_generated @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -my $copyright = 'Copyright (C) 2007,2009,2012,2014,2015,2016,2017 Olly Betts'; +my $copyright = 'Copyright (C) 2007,2009,2012,2014,2015,2016,2017,2018 Olly Betts'; # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -170,7 +170,13 @@ for my $class (sort keys %copyableclasses) { print " $class $object$params;\n"; print " TEST(!$object.get_description().empty());\n" if $get_description; print " $class copy_$object($object);\n"; + print " TEST(!copy_$object.get_description().empty());\n" if $get_description; + print " $class move_$object(std::move($object));\n"; + print " TEST(!move_$object.get_description().empty());\n" if $get_description; print " $object = copy_$object;\n"; + print " TEST(!$object.get_description().empty());\n" if $get_description; + print " copy_$object = std::move(move_$object);\n"; + print " TEST(!copy_$object.get_description().empty());\n" if $get_description; if ($params =~ /INMEMORY/) { print "#endif\n"; } -- 2.11.4.GIT