source: tests/regression/Potential/AddPotential/testsuite-potential-add-potential.at

stable v1.7.0
Last change on this file was a4b917, checked in by Frederik Heber <frederik.heber@…>, 6 weeks ago

Adds add and remove potential actions.

  • DOC: Adds missing actions to userguide.
  • TESTS: added actions test case with undo, redo and various cases.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1#
2# MoleCuilder - creates and alters molecular systems
3# Copyright (C) 2025 Frederik Heber
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17#
18### add a potentials
19
20AT_SETUP([Potential - Add a potential])
21AT_KEYWORDS([potential add-potential])
22
23AT_CHECK([../../molecuilder \
24 --add-potential morse \
25 --potential-charges 8 1 \
26 --save-potentials morse.potentials], 0, [stdout], [ignore])
27AT_CHECK([grep "morse:.*particle_type1=8,.*particle_type2=1,.*" morse.potentials], 0, [ignore], [ignore])
28
29AT_CLEANUP
30
31
32AT_SETUP([Potential - Add a potential with Undo])
33AT_KEYWORDS([potential add-potential undo])
34
35AT_CHECK([../../molecuilder \
36 --add-potential morse \
37 --potential-charges 8 1 \
38 --undo \
39 --save-potentials morse.potentials], 0, [stdout], [ignore])
40AT_CHECK([grep "morse:.*particle_type1=8,.*particle_type2=1,.*" morse.potentials], 1, [ignore], [ignore])
41
42AT_CLEANUP
43
44
45AT_SETUP([Potential - Add a potential with Redo])
46AT_KEYWORDS([potential add-potential undo redo])
47
48AT_CHECK([../../molecuilder \
49 --add-potential morse \
50 --potential-charges 8 1 \
51 --undo \
52 --redo \
53 --save-potentials morse.potentials], 0, [stdout], [ignore])
54AT_CHECK([grep "morse:.*particle_type1=8,.*particle_type2=1,.*" morse.potentials], 0, [ignore], [ignore])
55
56AT_CLEANUP
Note: See TracBrowser for help on using the repository browser.