123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- import unittest
- import utils
- all_files = [
- "core/mini_modify.alc",
- "core/core_formalism.mvc",
- "core/core_algorithm.alc",
- "primitives.alc",
- "object_operations.alc",
- "conformance_scd.alc",
- "library.alc",
- "transform.alc",
- "model_management.alc",
- "ramify.alc",
- "metamodels.alc",
- "random.alc",
- "constructors.alc",
- "modelling.alc",
- "compilation_manager.alc",
- ]
- class TestMvCModelOverwrite(unittest.TestCase):
- def model_overwrite(self, optimization_level):
- utils.write_perf_to_file(
- 'mvc_model_overwrite', optimization_level,
- utils.run_correctness_test(all_files, [
- "root",
- "root",
- "root",
- "model_add",
- "SimpleClassDiagrams",
- "Empty",
- "exit",
- "model_list_full",
- "model_modify",
- "Empty",
- "instantiate",
- "Class",
- "A",
- "exit",
- "model_list_full",
- "model_overwrite",
- "Empty",
- "instantiate_node",
- "",
- "Class",
- "B",
- "instantiate_node",
- "",
- "Class",
- "C",
- "exit",
- "model_list_full",
- "model_modify",
- "Empty",
- "list",
- "exit",
- ], [
- "Desired username for admin user?",
- "Desired password for admin user?",
- "Please repeat the password",
- "Passwords match!",
- "Welcome to the Model Management Interface v2.0!",
- "Use the 'help' command for a list of possible commands",
- "Ready for command...",
- "Creating new model!",
- "Model type?",
- "Model name?",
- "Waiting for model constructors...",
- "Model upload success!",
- "Ready for command...",
- set([
- " 221 root admin SimpleClassDiagrams : SimpleClassDiagrams",
- " 221 root admin CoreFormalism : SimpleClassDiagrams",
- " 200 root nobody Empty : SimpleClassDiagrams",
- " 221 root admin ActionLanguage : SimpleClassDiagrams",
- " 200 root admin core : CoreFormalism"
- ]),
- "Ready for command...",
- "Which model do you want to modify?",
- "Model loaded, ready for commands!",
- "Use 'help' command for a list of possible commands",
- "Please give your command.",
- "Type to instantiate?",
- "Name of new element?",
- "Instantiation successful!",
- "Please give your command.",
- "Ready for command...",
- set([
- " 221 root admin SimpleClassDiagrams : SimpleClassDiagrams",
- " 221 root admin CoreFormalism : SimpleClassDiagrams",
- " 221 root admin ActionLanguage : SimpleClassDiagrams",
- " 200 root nobody Empty : SimpleClassDiagrams",
- " 200 root admin core : CoreFormalism"
- ]),
- "Ready for command...",
- "Which model to overwrite?",
- "Waiting for model constructors...",
- "Model overwrite success!",
- "Ready for command...",
- set([
- " 221 root admin SimpleClassDiagrams : SimpleClassDiagrams",
- " 221 root admin CoreFormalism : SimpleClassDiagrams",
- " 221 root admin ActionLanguage : SimpleClassDiagrams",
- " 200 root nobody Empty : SimpleClassDiagrams",
- " 200 root admin core : CoreFormalism"
- ]),
- "Ready for command...",
- "Which model do you want to modify?",
- "Model loaded, ready for commands!",
- "Use 'help' command for a list of possible commands",
- "Please give your command.",
- "List of all elements:",
- set([" B : Class", " C : Class"]),
- "Please give your command.",
- "Ready for command...",
- ], optimization_level))
- utils.define_perf_tests(TestMvCModelOverwrite,
- TestMvCModelOverwrite.model_overwrite)
|