diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-28 12:24:03 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-28 12:24:03 +0200 |
| commit | ba27f512ef2a23511fc945298cda9937ca36df50 (patch) | |
| tree | 245da265e2198bba7a1c066f970590331c1e2003 /src/main.py | |
| parent | 6382d2b7c1910f29556b740513421b57da9c5a97 (diff) | |
| download | philosophers_test-ba27f512ef2a23511fc945298cda9937ca36df50.tar.gz philosophers_test-ba27f512ef2a23511fc945298cda9937ca36df50.tar.bz2 philosophers_test-ba27f512ef2a23511fc945298cda9937ca36df50.zip | |
Added error checking tests
Diffstat (limited to 'src/main.py')
| -rwxr-xr-x | src/main.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/main.py b/src/main.py index 473fc9a..13b2d41 100755 --- a/src/main.py +++ b/src/main.py @@ -1,4 +1,4 @@ -#!/bin/python3 +#!/usr/bin/env python3 # ############################################################################ # # # @@ -50,10 +50,27 @@ def main(): if args.philo != 1: sys.exit(1) - Test(10, 100, 100, 10) + Test.new_error([]) + Test.new_error(["10"]) + Test.new_error(["10", "10"]) + Test.new_error(["10", "10", "10"]) + Test.new_error(["10", "10", "10", "10", "10", "10"]) + Test.new_error(["-1", "10", "10", "10"]) + Test.new_error(["10", "-1", "10", "10"]) + Test.new_error(["10", "10", "-1", "10"]) + Test.new_error(["10", "10", "10", "-1"]) + Test.new_error(["10", "10", "10", "10", "-1"]) + + # Test(error_cmd=[str(config.UINT_MAX + 1), "10", "10", "10"], error=True) + + + # Test(10, 100, 100, 10) Test.run_all(config.PHILO_EXEC_PATHS[0]) # print("yo") if __name__ == "__main__": main() + + + |
