Research portable Memory game | Исследовать портируемую игру Память
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

89 行
1.8KB

  1. from cli import *
  2. from memory import *
  3. from memory_Context import *
  4. def cli_test_greetUser(
  5. ) -> str:
  6. c = memory_createContext()
  7. c.didLaunch = True
  8. c.recentField = "didLaunch"
  9. c = cli_greetUser(c)
  10. if (
  11. c.recentField == "outputGreeting"
  12. ):
  13. return "OK: cli_greetUser"
  14. #}
  15. return "ERR: cli_greetUser"
  16. #}
  17. #def cli_test_selectItem(
  18. #) -> str:
  19. # c = cli_createContext()
  20. # c.cMemory = memory_createContext()
  21. # c.input = "1"
  22. # c = cli_selectItem(c)
  23. # if (
  24. # c.recentField == "cMemory" and
  25. # c.cMemory.recentField == "selectedItems"
  26. # ):
  27. # return "OK: cli_selectItem"
  28. # #}
  29. # return "ERR: cli_selectItem"
  30. ##}
  31. #
  32. #def cli_test_shouldPromptSelection(
  33. #) -> str:
  34. # c = cli_createContext()
  35. # c.cMemory = memory_createContext()
  36. # c.input = "1"
  37. # c = cli_selectItem(c)
  38. # c = cli_shouldPromptSelection(c)
  39. # if (
  40. # c.recentField == "outputPromptSelection"
  41. # ):
  42. # return "OK: cli_shouldPromptSelection"
  43. # #}
  44. # return "ERR: cli_shouldPromptSelection"
  45. ##}
  46. #
  47. #def cli_test_shouldReportIvalidItemSelection_outOfBoundsMin(
  48. #) -> str:
  49. # c = cli_createContext()
  50. # c.cMemory = memory_createContext()
  51. # c.input = "0"
  52. # c = cli_selectItem(c)
  53. # c = cli_shouldReportInvalidItemSelection(c)
  54. # if (
  55. # c.recentField == "outputInvalidItemSelection"
  56. # ):
  57. # return "OK: cli_shouldReportInvalidItemSelection"
  58. # #}
  59. # return "ERR: cli_shouldReportInvalidItemSelection"
  60. ##}
  61. #
  62. #def cli_test_showHelp_h(
  63. #) -> str:
  64. # c = cli_createContext()
  65. # c.input = "h"
  66. # c = cli_showHelp(c)
  67. # if (
  68. # c.recentField == "outputHelp"
  69. # ):
  70. # return "OK: cli_showHelp_h"
  71. # #}
  72. # return "ERR: cli_showHelp_h"
  73. ##}
  74. #
  75. #def cli_test_showHelp_help(
  76. #) -> str:
  77. # c = cli_createContext()
  78. # c.input = "help"
  79. # c = cli_showHelp(c)
  80. # if (
  81. # c.recentField == "outputHelp"
  82. # ):
  83. # return "OK: cli_showHelp_help"
  84. # #}
  85. # return "ERR: cli_showHelp_help"
  86. ##}