ttk 0.1.576
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +32 -0
- data/COPYING +18 -0
- data/ChangeLog +4629 -0
- data/DATE +1 -0
- data/DESCRIPTION +8 -0
- data/GUIDELINES +84 -0
- data/LGPL +504 -0
- data/NEWS +69 -0
- data/NORM +85 -0
- data/README +206 -0
- data/REVISION +1 -0
- data/Rakefile +120 -0
- data/TODO +23 -0
- data/TODO.old +115 -0
- data/VERSION +5 -0
- data/bin/getopts/ttk.rb +394 -0
- data/bin/getopts/ttkd.rb +150 -0
- data/bin/getopts/ttkm.rb +71 -0
- data/bin/ttk +170 -0
- data/bin/ttkd +73 -0
- data/bin/ttkm +54 -0
- data/doc/html/classes/IO/CutInput.html +159 -0
- data/doc/html/classes/IO/Delegator.html +291 -0
- data/doc/html/classes/IO/Dispatch.html +204 -0
- data/doc/html/classes/IO/Ext.html +118 -0
- data/doc/html/classes/IO/ImplExt.html +149 -0
- data/doc/html/classes/IO/ImplIndent.html +175 -0
- data/doc/html/classes/IO/ImplPrintFile.html +142 -0
- data/doc/html/classes/IO/ImplPrintIO.html +143 -0
- data/doc/html/classes/IO/InputFilter.html +347 -0
- data/doc/html/classes/IO/OutputFilter.html +298 -0
- data/doc/html/classes/NilClass.html +198 -0
- data/doc/html/classes/SafeEval.html +277 -0
- data/doc/html/classes/String.html +245 -0
- data/doc/html/classes/SymTbl.html +146 -0
- data/doc/html/classes/TTK.html +658 -0
- data/doc/html/classes/TTK/AbortStatus.html +211 -0
- data/doc/html/classes/TTK/Daemons.html +142 -0
- data/doc/html/classes/TTK/Daemons/Daemon.html +170 -0
- data/doc/html/classes/TTK/Daemons/Daemon/Logger.html +192 -0
- data/doc/html/classes/TTK/Daemons/Master.html +163 -0
- data/doc/html/classes/TTK/Daemons/Slave.html +158 -0
- data/doc/html/classes/TTK/Dumpers.html +150 -0
- data/doc/html/classes/TTK/Dumpers/Dumper.html +461 -0
- data/doc/html/classes/TTK/Dumpers/Notif.html +208 -0
- data/doc/html/classes/TTK/Dumpers/Xml.html +260 -0
- data/doc/html/classes/TTK/Dumpers/Yaml.html +307 -0
- data/doc/html/classes/TTK/ErrorStatus.html +133 -0
- data/doc/html/classes/TTK/FailStatus.html +195 -0
- data/doc/html/classes/TTK/Fetchers.html +135 -0
- data/doc/html/classes/TTK/Fetchers/Client.html +229 -0
- data/doc/html/classes/TTK/Fetchers/Client/Receiver.html +254 -0
- data/doc/html/classes/TTK/Fetchers/Server.html +256 -0
- data/doc/html/classes/TTK/Fetchers/Server/Sender.html +241 -0
- data/doc/html/classes/TTK/Filters.html +142 -0
- data/doc/html/classes/TTK/Filters/BasicLogger.html +187 -0
- data/doc/html/classes/TTK/Filters/Filter.html +188 -0
- data/doc/html/classes/TTK/Filters/Saver.html +279 -0
- data/doc/html/classes/TTK/Loaders.html +115 -0
- data/doc/html/classes/TTK/Loaders/BaseNode.html +224 -0
- data/doc/html/classes/TTK/Loaders/Loader.html +242 -0
- data/doc/html/classes/TTK/Loaders/OYaml.html +161 -0
- data/doc/html/classes/TTK/Loaders/Yaml.html +157 -0
- data/doc/html/classes/TTK/Loaders/YamlOld.html +155 -0
- data/doc/html/classes/TTK/Logger.html +836 -0
- data/doc/html/classes/TTK/Logger/Path.html +161 -0
- data/doc/html/classes/TTK/Logger/SectionNode.html +925 -0
- data/doc/html/classes/TTK/Logger/Severity.html +306 -0
- data/doc/html/classes/TTK/Logger/ToTTKLog.html +119 -0
- data/doc/html/classes/TTK/Logger/Verbosity.html +278 -0
- data/doc/html/classes/TTK/LoggerFactory.html +204 -0
- data/doc/html/classes/TTK/Monitors.html +132 -0
- data/doc/html/classes/TTK/Monitors/Client.html +261 -0
- data/doc/html/classes/TTK/Monitors/Monitor.html +209 -0
- data/doc/html/classes/TTK/Monitors/Server.html +288 -0
- data/doc/html/classes/TTK/Monitors/Server/Notification.html +118 -0
- data/doc/html/classes/TTK/Monitors/Server/Notifier.html +118 -0
- data/doc/html/classes/TTK/PassStatus.html +168 -0
- data/doc/html/classes/TTK/RunningStatus.html +133 -0
- data/doc/html/classes/TTK/Services.html +161 -0
- data/doc/html/classes/TTK/Services/DRbService.html +217 -0
- data/doc/html/classes/TTK/Services/DRbService/Notification.html +123 -0
- data/doc/html/classes/TTK/Services/DRbService/SubTestable.html +197 -0
- data/doc/html/classes/TTK/Services/FetcherClient.html +190 -0
- data/doc/html/classes/TTK/Services/FetcherServer.html +149 -0
- data/doc/html/classes/TTK/Services/MonitorClient.html +190 -0
- data/doc/html/classes/TTK/Services/MonitorServer.html +149 -0
- data/doc/html/classes/TTK/Services/TesterClient.html +207 -0
- data/doc/html/classes/TTK/Services/TesterMaster.html +193 -0
- data/doc/html/classes/TTK/Services/TesterMaster/Notification.html +123 -0
- data/doc/html/classes/TTK/Services/TesterSlave.html +157 -0
- data/doc/html/classes/TTK/Services/TesterSlave/Notification.html +118 -0
- data/doc/html/classes/TTK/SkipStatus.html +169 -0
- data/doc/html/classes/TTK/StartStatus.html +133 -0
- data/doc/html/classes/TTK/Status.html +373 -0
- data/doc/html/classes/TTK/StatusException.html +161 -0
- data/doc/html/classes/TTK/StatusWithMessage.html +220 -0
- data/doc/html/classes/TTK/Strategies.html +356 -0
- data/doc/html/classes/TTK/Strategies/Abort.html +161 -0
- data/doc/html/classes/TTK/Strategies/Authors.html +170 -0
- data/doc/html/classes/TTK/Strategies/Ball.html +200 -0
- data/doc/html/classes/TTK/Strategies/Block.html +230 -0
- data/doc/html/classes/TTK/Strategies/Bootstrap.html +238 -0
- data/doc/html/classes/TTK/Strategies/Checkout.html +201 -0
- data/doc/html/classes/TTK/Strategies/Clean.html +160 -0
- data/doc/html/classes/TTK/Strategies/Cmd.html +218 -0
- data/doc/html/classes/TTK/Strategies/CmdBase.html +312 -0
- data/doc/html/classes/TTK/Strategies/Collection.html +282 -0
- data/doc/html/classes/TTK/Strategies/Compile.html +199 -0
- data/doc/html/classes/TTK/Strategies/Composite.html +541 -0
- data/doc/html/classes/TTK/Strategies/Composite/Ordered.html +183 -0
- data/doc/html/classes/TTK/Strategies/Configure.html +270 -0
- data/doc/html/classes/TTK/Strategies/DistDelegate.html +192 -0
- data/doc/html/classes/TTK/Strategies/DistDuplicate.html +221 -0
- data/doc/html/classes/TTK/Strategies/DistStrategy.html +224 -0
- data/doc/html/classes/TTK/Strategies/Distribute.html +163 -0
- data/doc/html/classes/TTK/Strategies/Error.html +161 -0
- data/doc/html/classes/TTK/Strategies/Extract.html +179 -0
- data/doc/html/classes/TTK/Strategies/Fail.html +161 -0
- data/doc/html/classes/TTK/Strategies/Fetch.html +400 -0
- data/doc/html/classes/TTK/Strategies/Fetcher.html +276 -0
- data/doc/html/classes/TTK/Strategies/Glob.html +201 -0
- data/doc/html/classes/TTK/Strategies/IOBased.html +400 -0
- data/doc/html/classes/TTK/Strategies/Import.html +215 -0
- data/doc/html/classes/TTK/Strategies/JUnit.html +623 -0
- data/doc/html/classes/TTK/Strategies/KillAll.html +249 -0
- data/doc/html/classes/TTK/Strategies/Make.html +235 -0
- data/doc/html/classes/TTK/Strategies/Make/All.html +120 -0
- data/doc/html/classes/TTK/Strategies/Make/Check.html +120 -0
- data/doc/html/classes/TTK/Strategies/Make/Default.html +155 -0
- data/doc/html/classes/TTK/Strategies/Make/DistCheck.html +120 -0
- data/doc/html/classes/TTK/Strategies/Make/Install.html +120 -0
- data/doc/html/classes/TTK/Strategies/Make/Target.html +179 -0
- data/doc/html/classes/TTK/Strategies/Package.html +271 -0
- data/doc/html/classes/TTK/Strategies/PackageCollection.html +168 -0
- data/doc/html/classes/TTK/Strategies/Pass.html +161 -0
- data/doc/html/classes/TTK/Strategies/Pool.html +306 -0
- data/doc/html/classes/TTK/Strategies/Pool/PoolComponent.html +139 -0
- data/doc/html/classes/TTK/Strategies/ProbabilityThreshold.html +187 -0
- data/doc/html/classes/TTK/Strategies/Proxy.html +211 -0
- data/doc/html/classes/TTK/Strategies/RUnit.html +355 -0
- data/doc/html/classes/TTK/Strategies/RemoteCmd.html +213 -0
- data/doc/html/classes/TTK/Strategies/SignalCmd.html +269 -0
- data/doc/html/classes/TTK/Strategies/Sleep.html +193 -0
- data/doc/html/classes/TTK/Strategies/SqlQuery.html +248 -0
- data/doc/html/classes/TTK/Strategies/Strategy.html +2847 -0
- data/doc/html/classes/TTK/Strategies/Strategy/AssertEval.html +233 -0
- data/doc/html/classes/TTK/Strategies/Strategy/AttributedClass.html +107 -0
- data/doc/html/classes/TTK/Strategies/Strategy/AttributedClass/Attribute.html +246 -0
- data/doc/html/classes/TTK/Strategies/Strategy/Failure.html +121 -0
- data/doc/html/classes/TTK/Strategies/Stub.html +179 -0
- data/doc/html/classes/TTK/Strategies/SubCmd.html +243 -0
- data/doc/html/classes/TTK/Strategies/Suite.html +182 -0
- data/doc/html/classes/TTK/Strategies/Test.html +310 -0
- data/doc/html/classes/TTK/Strategies/Tester.html +218 -0
- data/doc/html/classes/TTK/Streams.html +116 -0
- data/doc/html/classes/TTK/Streams/Diff.html +148 -0
- data/doc/html/classes/TTK/Streams/Stream.html +295 -0
- data/doc/html/classes/TTK/SymTbl.html +266 -0
- data/doc/html/classes/TTK/TTKException.html +118 -0
- data/doc/html/classes/TTK/TTKModule.html +145 -0
- data/doc/html/classes/TTK/Testers.html +156 -0
- data/doc/html/classes/TTK/Testers/Master.html +304 -0
- data/doc/html/classes/TTK/Testers/Slave.html +120 -0
- data/doc/html/classes/TTK/Testers/Tester.html +547 -0
- data/doc/html/classes/TTK/Testers/Tester/Config.html +310 -0
- data/doc/html/classes/TTK/Testers/Tester/Notification.html +123 -0
- data/doc/html/classes/TTK/Testers/Tester/Notifier.html +118 -0
- data/doc/html/classes/TTK/Testers/Tester/QueryNode.html +341 -0
- data/doc/html/classes/TTK/Testers/Tester/RemoteStatus.html +165 -0
- data/doc/html/classes/TTK/Testers/Tester/RunningTask.html +262 -0
- data/doc/html/classes/TTK/Testers/Tester/Score.html +198 -0
- data/doc/html/classes/TTK/TimeoutAbortStatus.html +161 -0
- data/doc/html/classes/TTK/Tools.html +111 -0
- data/doc/html/classes/TTK/Tools/HostDispatcher.html +246 -0
- data/doc/html/classes/TTK/Weights.html +160 -0
- data/doc/html/classes/TTK/Weights/WExpr.html +326 -0
- data/doc/html/classes/TTK/Weights/WFloat.html +149 -0
- data/doc/html/classes/TTK/Weights/WMin.html +148 -0
- data/doc/html/classes/TTK/Weights/Weight.html +624 -0
- data/doc/html/created.rid +1 -0
- data/doc/html/files/AUTHORS.html +198 -0
- data/doc/html/files/NEWS.html +236 -0
- data/doc/html/files/README.html +435 -0
- data/doc/html/files/TODO.html +128 -0
- data/doc/html/files/lib/ttk/Tools/HostDispatcher_rb.html +126 -0
- data/doc/html/files/lib/ttk/Tools/SafeEval_rb.html +119 -0
- data/doc/html/files/lib/ttk/Tools/cut_output_rb.html +126 -0
- data/doc/html/files/lib/ttk/Tools/io/delegator_rb.html +127 -0
- data/doc/html/files/lib/ttk/Tools/io/dispatch_rb.html +127 -0
- data/doc/html/files/lib/ttk/Tools/io/ext_rb.html +126 -0
- data/doc/html/files/lib/ttk/Tools/io/filters_rb.html +127 -0
- data/doc/html/files/lib/ttk/daemons/Daemon_rb.html +126 -0
- data/doc/html/files/lib/ttk/daemons/Master_rb.html +119 -0
- data/doc/html/files/lib/ttk/daemons/Slave_rb.html +119 -0
- data/doc/html/files/lib/ttk/daemons/daemon/logger_rb.html +126 -0
- data/doc/html/files/lib/ttk/dumpers/Dumper_rb.html +119 -0
- data/doc/html/files/lib/ttk/dumpers/Notif_rb.html +119 -0
- data/doc/html/files/lib/ttk/dumpers/Xml_rb.html +126 -0
- data/doc/html/files/lib/ttk/dumpers/Yaml_rb.html +119 -0
- data/doc/html/files/lib/ttk/fetchers/Client_rb.html +126 -0
- data/doc/html/files/lib/ttk/fetchers/Server_rb.html +126 -0
- data/doc/html/files/lib/ttk/fetchers/client/receiver_rb.html +127 -0
- data/doc/html/files/lib/ttk/fetchers/server/sender_rb.html +127 -0
- data/doc/html/files/lib/ttk/filters/BasicLogger_rb.html +126 -0
- data/doc/html/files/lib/ttk/filters/Filter_rb.html +119 -0
- data/doc/html/files/lib/ttk/filters/Saver_rb.html +119 -0
- data/doc/html/files/lib/ttk/loaders/Loader_rb.html +119 -0
- data/doc/html/files/lib/ttk/loaders/OYaml_rb.html +126 -0
- data/doc/html/files/lib/ttk/loaders/YamlOld_rb.html +126 -0
- data/doc/html/files/lib/ttk/loaders/Yaml_rb.html +126 -0
- data/doc/html/files/lib/ttk/logger/path_rb.html +119 -0
- data/doc/html/files/lib/ttk/logger/section_node_rb.html +119 -0
- data/doc/html/files/lib/ttk/logger/severity_rb.html +119 -0
- data/doc/html/files/lib/ttk/logger/to_ttk_log_rb.html +119 -0
- data/doc/html/files/lib/ttk/logger/verbosity_rb.html +119 -0
- data/doc/html/files/lib/ttk/logger_factory_rb.html +119 -0
- data/doc/html/files/lib/ttk/logger_rb.html +131 -0
- data/doc/html/files/lib/ttk/monitors/Client_rb.html +119 -0
- data/doc/html/files/lib/ttk/monitors/Monitor_rb.html +127 -0
- data/doc/html/files/lib/ttk/monitors/Server_rb.html +126 -0
- data/doc/html/files/lib/ttk/services/DRbService/sub_testable_rb.html +119 -0
- data/doc/html/files/lib/ttk/services/DRbService_rb.html +126 -0
- data/doc/html/files/lib/ttk/services/FetcherClient_rb.html +119 -0
- data/doc/html/files/lib/ttk/services/FetcherServer_rb.html +119 -0
- data/doc/html/files/lib/ttk/services/MonitorClient_rb.html +119 -0
- data/doc/html/files/lib/ttk/services/MonitorServer_rb.html +119 -0
- data/doc/html/files/lib/ttk/services/TesterClient_rb.html +119 -0
- data/doc/html/files/lib/ttk/services/TesterMaster_rb.html +119 -0
- data/doc/html/files/lib/ttk/services/TesterSlave_rb.html +119 -0
- data/doc/html/files/lib/ttk/status_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Abort_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Authors_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Ball_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Block_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Bootstrap_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Checkout_rb.html +127 -0
- data/doc/html/files/lib/ttk/strategies/Clean_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/CmdBase_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Cmd_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Collection_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Compile_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Composite_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Configure_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/DistDelegate_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/DistDuplicate_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/DistStrategy_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Distribute_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Error_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Extract_rb.html +126 -0
- data/doc/html/files/lib/ttk/strategies/Fail_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Fetch_rb.html +127 -0
- data/doc/html/files/lib/ttk/strategies/Fetcher_rb.html +126 -0
- data/doc/html/files/lib/ttk/strategies/Glob_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/IOBased_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Import_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/JUnit_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/KillAll_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Make_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/PackageCollection_rb.html +126 -0
- data/doc/html/files/lib/ttk/strategies/Package_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Pass_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Pool_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/ProbabilityThreshold_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Proxy_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/RUnit_rb.html +127 -0
- data/doc/html/files/lib/ttk/strategies/RemoteCmd_rb.html +126 -0
- data/doc/html/files/lib/ttk/strategies/SignalCmd_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Sleep_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/SqlQuery_rb.html +126 -0
- data/doc/html/files/lib/ttk/strategies/Strategy/assert_eval_rb.html +127 -0
- data/doc/html/files/lib/ttk/strategies/Strategy_rb.html +131 -0
- data/doc/html/files/lib/ttk/strategies/Streams/Diff_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Streams/Stream_rb.html +126 -0
- data/doc/html/files/lib/ttk/strategies/Stub_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/SubCmd_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Suite_rb.html +119 -0
- data/doc/html/files/lib/ttk/strategies/Test_rb.html +127 -0
- data/doc/html/files/lib/ttk/strategies/Tester_rb.html +126 -0
- data/doc/html/files/lib/ttk/symtbl_rb.html +126 -0
- data/doc/html/files/lib/ttk/testers/Master_rb.html +119 -0
- data/doc/html/files/lib/ttk/testers/Slave_rb.html +119 -0
- data/doc/html/files/lib/ttk/testers/Tester_rb.html +131 -0
- data/doc/html/files/lib/ttk/testers/tester/config_rb.html +126 -0
- data/doc/html/files/lib/ttk/testers/tester/notifier_rb.html +119 -0
- data/doc/html/files/lib/ttk/testers/tester/query_node_rb.html +126 -0
- data/doc/html/files/lib/ttk/testers/tester/remote_status_rb.html +119 -0
- data/doc/html/files/lib/ttk/testers/tester/running_task_rb.html +119 -0
- data/doc/html/files/lib/ttk/testers/tester/score_rb.html +119 -0
- data/doc/html/files/lib/ttk/weights/WExpr_rb.html +119 -0
- data/doc/html/files/lib/ttk/weights/WFloat_rb.html +119 -0
- data/doc/html/files/lib/ttk/weights/WMin_rb.html +119 -0
- data/doc/html/files/lib/ttk/weights/Weight_rb.html +126 -0
- data/doc/html/files/lib/ttk_rb.html +146 -0
- data/doc/html/files/lib/ttkd_rb.html +131 -0
- data/doc/html/files/template/README.html +160 -0
- data/doc/html/files/test/examples/README.html +190 -0
- data/doc/html/fr_class_index.html +186 -0
- data/doc/html/fr_file_index.html +147 -0
- data/doc/html/fr_method_index.html +581 -0
- data/doc/html/index.html +24 -0
- data/doc/html/rdoc-style.css +208 -0
- data/lib/ttk.rb +111 -0
- data/lib/ttk/Tools/HostDispatcher.rb +44 -0
- data/lib/ttk/Tools/SafeEval.rb +64 -0
- data/lib/ttk/Tools/cut_output.rb +35 -0
- data/lib/ttk/Tools/io/delegator.rb +88 -0
- data/lib/ttk/Tools/io/dispatch.rb +31 -0
- data/lib/ttk/Tools/io/ext.rb +70 -0
- data/lib/ttk/Tools/io/filters.rb +71 -0
- data/lib/ttk/daemons/Daemon.rb +34 -0
- data/lib/ttk/daemons/Master.rb +34 -0
- data/lib/ttk/daemons/Slave.rb +29 -0
- data/lib/ttk/daemons/daemon/logger.rb +57 -0
- data/lib/ttk/dumpers/Dumper.rb +81 -0
- data/lib/ttk/dumpers/Notif.rb +33 -0
- data/lib/ttk/dumpers/Xml.rb +112 -0
- data/lib/ttk/dumpers/Yaml.rb +159 -0
- data/lib/ttk/fetchers/Client.rb +41 -0
- data/lib/ttk/fetchers/Server.rb +49 -0
- data/lib/ttk/fetchers/client/receiver.rb +62 -0
- data/lib/ttk/fetchers/server/sender.rb +69 -0
- data/lib/ttk/filters/BasicLogger.rb +30 -0
- data/lib/ttk/filters/Filter.rb +24 -0
- data/lib/ttk/filters/Saver.rb +60 -0
- data/lib/ttk/loaders/Loader.rb +123 -0
- data/lib/ttk/loaders/OYaml.rb +60 -0
- data/lib/ttk/loaders/Yaml.rb +74 -0
- data/lib/ttk/loaders/YamlOld.rb +65 -0
- data/lib/ttk/logger.rb +237 -0
- data/lib/ttk/logger/path.rb +23 -0
- data/lib/ttk/logger/section_node.rb +214 -0
- data/lib/ttk/logger/severity.rb +62 -0
- data/lib/ttk/logger/to_ttk_log.rb +83 -0
- data/lib/ttk/logger/verbosity.rb +61 -0
- data/lib/ttk/logger_factory.rb +50 -0
- data/lib/ttk/monitors/Client.rb +61 -0
- data/lib/ttk/monitors/Monitor.rb +50 -0
- data/lib/ttk/monitors/Server.rb +73 -0
- data/lib/ttk/services/DRbService.rb +45 -0
- data/lib/ttk/services/DRbService/sub_testable.rb +41 -0
- data/lib/ttk/services/FetcherClient.rb +31 -0
- data/lib/ttk/services/FetcherServer.rb +23 -0
- data/lib/ttk/services/MonitorClient.rb +31 -0
- data/lib/ttk/services/MonitorServer.rb +23 -0
- data/lib/ttk/services/TesterClient.rb +38 -0
- data/lib/ttk/services/TesterMaster.rb +40 -0
- data/lib/ttk/services/TesterSlave.rb +31 -0
- data/lib/ttk/status.rb +190 -0
- data/lib/ttk/strategies/Abort.rb +24 -0
- data/lib/ttk/strategies/Authors.rb +43 -0
- data/lib/ttk/strategies/Ball.rb +68 -0
- data/lib/ttk/strategies/Block.rb +95 -0
- data/lib/ttk/strategies/Bootstrap.rb +52 -0
- data/lib/ttk/strategies/Checkout.rb +53 -0
- data/lib/ttk/strategies/Clean.rb +29 -0
- data/lib/ttk/strategies/Cmd.rb +55 -0
- data/lib/ttk/strategies/CmdBase.rb +103 -0
- data/lib/ttk/strategies/Collection.rb +131 -0
- data/lib/ttk/strategies/Compile.rb +56 -0
- data/lib/ttk/strategies/Composite.rb +173 -0
- data/lib/ttk/strategies/Configure.rb +64 -0
- data/lib/ttk/strategies/DistDelegate.rb +45 -0
- data/lib/ttk/strategies/DistDuplicate.rb +64 -0
- data/lib/ttk/strategies/DistStrategy.rb +42 -0
- data/lib/ttk/strategies/Distribute.rb +39 -0
- data/lib/ttk/strategies/Error.rb +23 -0
- data/lib/ttk/strategies/Extract.rb +45 -0
- data/lib/ttk/strategies/Fail.rb +26 -0
- data/lib/ttk/strategies/Fetch.rb +124 -0
- data/lib/ttk/strategies/Fetcher.rb +74 -0
- data/lib/ttk/strategies/Glob.rb +48 -0
- data/lib/ttk/strategies/IOBased.rb +156 -0
- data/lib/ttk/strategies/Import.rb +45 -0
- data/lib/ttk/strategies/JUnit.rb +205 -0
- data/lib/ttk/strategies/KillAll.rb +59 -0
- data/lib/ttk/strategies/Make.rb +94 -0
- data/lib/ttk/strategies/Package.rb +128 -0
- data/lib/ttk/strategies/PackageCollection.rb +72 -0
- data/lib/ttk/strategies/Pass.rb +24 -0
- data/lib/ttk/strategies/Pool.rb +99 -0
- data/lib/ttk/strategies/ProbabilityThreshold.rb +42 -0
- data/lib/ttk/strategies/Proxy.rb +42 -0
- data/lib/ttk/strategies/RUnit.rb +170 -0
- data/lib/ttk/strategies/RemoteCmd.rb +48 -0
- data/lib/ttk/strategies/SignalCmd.rb +85 -0
- data/lib/ttk/strategies/Sleep.rb +36 -0
- data/lib/ttk/strategies/SqlQuery.rb +120 -0
- data/lib/ttk/strategies/Strategy.rb +606 -0
- data/lib/ttk/strategies/Strategy/assert_eval.rb +53 -0
- data/lib/ttk/strategies/Streams/Diff.rb +60 -0
- data/lib/ttk/strategies/Streams/Stream.rb +133 -0
- data/lib/ttk/strategies/Stub.rb +35 -0
- data/lib/ttk/strategies/SubCmd.rb +58 -0
- data/lib/ttk/strategies/Suite.rb +118 -0
- data/lib/ttk/strategies/Test.rb +88 -0
- data/lib/ttk/strategies/Tester.rb +59 -0
- data/lib/ttk/symtbl.rb +115 -0
- data/lib/ttk/testers/Master.rb +69 -0
- data/lib/ttk/testers/Slave.rb +19 -0
- data/lib/ttk/testers/Tester.rb +134 -0
- data/lib/ttk/testers/tester/config.rb +65 -0
- data/lib/ttk/testers/tester/notifier.rb +24 -0
- data/lib/ttk/testers/tester/query_node.rb +91 -0
- data/lib/ttk/testers/tester/remote_status.rb +29 -0
- data/lib/ttk/testers/tester/running_task.rb +47 -0
- data/lib/ttk/testers/tester/score.rb +34 -0
- data/lib/ttk/weights/WExpr.rb +68 -0
- data/lib/ttk/weights/WFloat.rb +23 -0
- data/lib/ttk/weights/WMin.rb +22 -0
- data/lib/ttk/weights/Weight.rb +85 -0
- data/lib/ttkd.rb +51 -0
- data/ruby_ex/abstract.rb +246 -0
- data/ruby_ex/abstract_node.rb +85 -0
- data/ruby_ex/array_each_pair.rb +18 -0
- data/ruby_ex/ask.rb +101 -0
- data/ruby_ex/attributed_class.rb +304 -0
- data/ruby_ex/cache.rb +373 -0
- data/ruby_ex/checkout.rb +12 -0
- data/ruby_ex/config_file.rb +96 -0
- data/ruby_ex/const_regexp.rb +59 -0
- data/ruby_ex/daemon.rb +134 -0
- data/ruby_ex/diff.rb +667 -0
- data/ruby_ex/dlogger.rb +62 -0
- data/ruby_ex/drb/dispatcher.rb +252 -0
- data/ruby_ex/drb/dispatcher_server_test.rb +29 -0
- data/ruby_ex/drb/drb_observable.rb +97 -0
- data/ruby_ex/drb/drb_observable_pool.rb +27 -0
- data/ruby_ex/drb/drb_service.rb +43 -0
- data/ruby_ex/drb/drb_undumped_attributes.rb +55 -0
- data/ruby_ex/drb/drb_undumped_indexed_object.rb +54 -0
- data/ruby_ex/drb/insecure_protected_methods.rb +103 -0
- data/ruby_ex/drb/session_client_test.rb +40 -0
- data/ruby_ex/drb/session_manager.rb +246 -0
- data/ruby_ex/drb/session_server.rb +53 -0
- data/ruby_ex/dtime.rb +143 -0
- data/ruby_ex/dumpable_proc.rb +63 -0
- data/ruby_ex/exception.rb +32 -0
- data/ruby_ex/filetype.rb +229 -0
- data/ruby_ex/fileutils_ex.rb +44 -0
- data/ruby_ex/fold.rb +58 -0
- data/ruby_ex/generate_id.rb +31 -0
- data/ruby_ex/inactive_timeout.rb +137 -0
- data/ruby_ex/indexed_node.rb +66 -0
- data/ruby_ex/io_marshal.rb +100 -0
- data/ruby_ex/ioo.rb +194 -0
- data/ruby_ex/labeled_node.rb +63 -0
- data/ruby_ex/logger_observer.rb +23 -0
- data/ruby_ex/md5sum.rb +66 -0
- data/ruby_ex/mktemp.rb +208 -0
- data/ruby_ex/module/attr_once.rb +36 -0
- data/ruby_ex/module/autoload_tree.rb +68 -0
- data/ruby_ex/module/hierarchy.rb +335 -0
- data/ruby_ex/module/instance_method_visibility.rb +73 -0
- data/ruby_ex/module_ex.rb +11 -0
- data/ruby_ex/node.rb +80 -0
- data/ruby_ex/object_monitor.rb +145 -0
- data/ruby_ex/object_monitor_activity.rb +33 -0
- data/ruby_ex/observable.rb +140 -0
- data/ruby_ex/observable_pool.rb +293 -0
- data/ruby_ex/orderedhash.rb +252 -0
- data/ruby_ex/pathname_ex.rb +113 -0
- data/ruby_ex/pp_hierarchy.rb +29 -0
- data/ruby_ex/pseudo_cache.rb +190 -0
- data/ruby_ex/queue.rb +56 -0
- data/ruby_ex/safe_eval.rb +348 -0
- data/ruby_ex/service_manager.rb +121 -0
- data/ruby_ex/session/administrable.rb +120 -0
- data/ruby_ex/session/client.rb +153 -0
- data/ruby_ex/session/const.rb +18 -0
- data/ruby_ex/session/dispatcher.rb +184 -0
- data/ruby_ex/session/error.rb +21 -0
- data/ruby_ex/session/fetchable.rb +57 -0
- data/ruby_ex/session/fetcher.rb +62 -0
- data/ruby_ex/session/hookable.rb +26 -0
- data/ruby_ex/session/profile.rb +110 -0
- data/ruby_ex/session/server.rb +582 -0
- data/ruby_ex/session/test/administrable_test.rb +337 -0
- data/ruby_ex/session/test/basic_test.rb +523 -0
- data/ruby_ex/session/test/dispatcher_test.rb +409 -0
- data/ruby_ex/session/test/fetchable_test.rb +119 -0
- data/ruby_ex/session/test/sub_server_test.rb +188 -0
- data/ruby_ex/spring.rb +136 -0
- data/ruby_ex/spring_set.rb +137 -0
- data/ruby_ex/symtbl.rb +106 -0
- data/ruby_ex/synflow.rb +474 -0
- data/ruby_ex/test/unit/ui/yaml/testrunner.rb +164 -0
- data/ruby_ex/thread_mutex.rb +10 -0
- data/ruby_ex/timeout_ex.rb +81 -0
- data/ruby_ex/top_down.rb +73 -0
- data/ruby_ex/trace.rb +26 -0
- data/ruby_ex/uri/druby.rb +81 -0
- data/ruby_ex/uri/file.rb +39 -0
- data/ruby_ex/uri/ftp_ex.rb +37 -0
- data/ruby_ex/uri/http_ex.rb +43 -0
- data/ruby_ex/uri/svn.rb +101 -0
- data/ruby_ex/uri_ex.rb +35 -0
- data/ruby_ex/version.rb +66 -0
- data/ruby_ex/yaml/basenode_ext.rb +63 -0
- data/ruby_ex/yaml/transform.rb +447 -0
- data/ruby_ex/yaml/yregexpath.rb +76 -0
- data/test/all/TestTAssert/first.yml +65 -0
- data/test/all/TestTAssert/segfault.yml +31 -0
- data/test/all/dist-suite-indirect-nested.yml +15 -0
- data/test/all/dist-suite-nested-3.yml +16 -0
- data/test/all/dist-suite-nested-in-pool.yml +51 -0
- data/test/all/dist-suite-nested.yml +28 -0
- data/test/all/no_suite.yml +18 -0
- data/test/all/pipeline-timeout.yml +21 -0
- data/test/all/remote_cmd.yml +23 -0
- data/test/all/remote_dispatcher.yml +26 -0
- data/test/all/suite_timeout.yml +32 -0
- data/test/all/weight.yml +113 -0
- data/test/all/xunit/junit/MultiRight/Foo/Foo.java +11 -0
- data/test/all/xunit/junit/MultiRight/Foo/FooTest.java +15 -0
- data/test/all/xunit/junit/MultiRight/MultiRight.java +13 -0
- data/test/all/xunit/junit/MultiRight/MultiRightTest.java +12 -0
- data/test/all/xunit/junit/MultiRight/bar/Bar.java +11 -0
- data/test/all/xunit/junit/MultiRight/bar/BarTest.java +21 -0
- data/test/all/xunit/junit/MultiRight/build.sh +7 -0
- data/test/all/xunit/junit/SimpleException/SimpleExceptionTest.java +11 -0
- data/test/all/xunit/junit/SimpleException/build.sh +4 -0
- data/test/all/xunit/junit/build.sh +9 -0
- data/test/all/xunit/junit/multibar.yml +6 -0
- data/test/all/xunit/junit/multifoo.yml +6 -0
- data/test/all/xunit/junit/multiright.yml +8 -0
- data/test/all/xunit/junit/simple_exception.yml +6 -0
- data/test/examples-suite.yml +10 -0
- data/test/examples/README +68 -0
- data/test/examples/cache/simple.yml +33 -0
- data/test/examples/sql/basic.yml +26 -0
- data/test/examples/students-suite.yml +11 -0
- data/test/examples/students/ball.yml +13 -0
- data/test/examples/students/glob_stud.yml +23 -0
- data/test/examples/students/mini-lib.yml +73 -0
- data/test/examples/students/pool_stud.yml +35 -0
- data/test/examples/students/stud.yml +25 -0
- data/test/ressources/ball/20040804-exam_a1-zapngo-tessar_m.tar.gz +0 -0
- data/test/ressources/ball/Makefile +24 -0
- data/test/ressources/ball/bar_p-mini-lib.tar.bz2 +0 -0
- data/test/ressources/ball/bar_p-mini-lib/Makefile +20 -0
- data/test/ressources/ball/bar_p-mini-lib/my_strlen.c +13 -0
- data/test/ressources/ball/foo_s-mini-lib.tar.bz2 +0 -0
- data/test/ressources/ball/foo_s-mini-lib/Makefile +20 -0
- data/test/ressources/ball/foo_s-mini-lib/configure +2 -0
- data/test/ressources/ball/foo_s-mini-lib/my_strlen.c +10 -0
- data/test/ressources/ball/hello.tar.bz2 +0 -0
- data/test/ressources/ball/hello.tar.gz +0 -0
- data/test/ressources/ball/hello/Makefile +14 -0
- data/test/ressources/ball/hello/hello.c +7 -0
- data/test/ressources/ball/jack-exit.tar.bz2 +0 -0
- data/test/ressources/ball/jack-exit/Makefile +14 -0
- data/test/ressources/ball/jack-exit/exit.c +16 -0
- data/test/ressources/ball/joe-exit.tar.bz2 +0 -0
- data/test/ressources/ball/joe-exit/Makefile +14 -0
- data/test/ressources/ball/joe-exit/exit.c +8 -0
- data/test/ressources/ball/joe_i-mini-lib.tar.bz2 +0 -0
- data/test/ressources/ball/joe_i-mini-lib/Makefile +20 -0
- data/test/ressources/ball/joe_i-mini-lib/configure +2 -0
- data/test/ressources/ball/joe_i-mini-lib/my_strlen.c +10 -0
- data/test/ressources/ball/john-exit.tar.bz2 +0 -0
- data/test/ressources/ball/john-exit/Makefile +14 -0
- data/test/ressources/ball/john-exit/exit.c +6 -0
- data/test/ressources/ball/qux_j-mini-lib.tar.bz2 +0 -0
- data/test/ressources/ball/qux_j-mini-lib/Makefile +20 -0
- data/test/ressources/ball/qux_j-mini-lib/my_strlen.c +12 -0
- data/test/ressources/mini-lib/Makefile +9 -0
- data/test/ressources/mini-lib/strlen.c +15 -0
- data/test/ressources/package/pkg_foo.tar.gz +0 -0
- data/test/ressources/package/pkg_foo/Makefile +20 -0
- data/test/ressources/package/pkg_foo/bootstrap +3 -0
- data/test/ressources/package/pkg_foo/configure +3 -0
- data/test/ressources/package/pkg_foo/foo.sh +2 -0
- data/test/ressources/runit/bad.rb +30 -0
- data/test/ressources/runit/error.rb +6 -0
- data/test/ressources/runit/good.rb +30 -0
- data/test/ressources/text/1.txt +4 -0
- data/test/runit/dumpers/xml_test.rb +75 -0
- data/test/runit/dumpers/yaml_test.rb +68 -0
- data/test/runit/fetchers/fetchers_test.rb +48 -0
- data/test/runit/loaders/OYaml_test.rb +35 -0
- data/test/runit/logger/section_node_test.rb +125 -0
- data/test/runit/logger/severity_test.rb +41 -0
- data/test/runit/logger/verbosity_test.rb +49 -0
- data/test/runit/logger_test.rb +295 -0
- data/test/runit/strategies/Strategy/assert_eval_test.rb +196 -0
- data/test/ttk-check +26 -0
- data/test/ttk-dist-suite.yml +44 -0
- data/test/ttk-dist/cat/file.in +3 -0
- data/test/ttk-dist/cat/file.out +3 -0
- data/test/ttk-dist/dist-abort.yml +51 -0
- data/test/ttk-dist/dist-cat.yml +38 -0
- data/test/ttk-dist/dist-delegate.yml +56 -0
- data/test/ttk-dist/dist-dispatch.yml +28 -0
- data/test/ttk-dist/dist-error.yml +10 -0
- data/test/ttk-dist/dist-fail.yml +9 -0
- data/test/ttk-dist/dist-nested-pass.yml +11 -0
- data/test/ttk-dist/dist-pass.yml +8 -0
- data/test/ttk-dist/dist-ribute.yml +31 -0
- data/test/ttk-dist/dist-suite.yml +18 -0
- data/test/ttk-dist/local-fetch.yml +17 -0
- data/test/ttk-dist/tester.yml +36 -0
- data/test/ttk-minimal-suite.yml +12 -0
- data/test/ttk-minimal/author.yml +14 -0
- data/test/ttk-minimal/base.yml +137 -0
- data/test/ttk-minimal/block.yml +15 -0
- data/test/ttk-minimal/cat.yml +19 -0
- data/test/ttk-minimal/diff.yml +29 -0
- data/test/ttk-minimal/env_cmd.yml +54 -0
- data/test/ttk-minimal/exit.yml +17 -0
- data/test/ttk-minimal/fatal.yml +32 -0
- data/test/ttk-minimal/glob.yml +13 -0
- data/test/ttk-minimal/import.yml +33 -0
- data/test/ttk-minimal/killall.yml +36 -0
- data/test/ttk-minimal/pkg.yml +18 -0
- data/test/ttk-minimal/pool.yml +44 -0
- data/test/ttk-minimal/probability_threshold.yml +39 -0
- data/test/ttk-minimal/runit.yml +25 -0
- data/test/ttk-minimal/signal_cmd.yml +24 -0
- data/test/ttk-minimal/sub.yml +9 -0
- data/test/ttk-minimal/test.yml +26 -0
- data/test/ttk-minimal/timeout.yml +24 -0
- data/test/ttk-minimal/unit_test.yml +13 -0
- data/test/ttk-minimal/wc.yml +28 -0
- metadata +801 -0
@@ -0,0 +1,248 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: TTK::Strategies::SqlQuery</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">TTK::Strategies::SqlQuery</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/ttk/strategies/SqlQuery_rb.html">
|
59
|
+
lib/ttk/strategies/SqlQuery.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="Strategy.html">
|
69
|
+
Strategy
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
<div id="description">
|
84
|
+
<p>
|
85
|
+
This strategy manage <em>SQL</em> base tests. It use unit testing (EXCEPT
|
86
|
+
ALL query) for checking results. To use it, you need to have <em>dbi</em>
|
87
|
+
installed on your test system and have a database with these things:
|
88
|
+
</p>
|
89
|
+
<pre>
|
90
|
+
* a test schema (MY)
|
91
|
+
* a reference schema (REF)
|
92
|
+
</pre>
|
93
|
+
<p>
|
94
|
+
After that you have just to write all queries that you want to test.
|
95
|
+
Queries will be called on each schema by applying a delta operation:
|
96
|
+
</p>
|
97
|
+
<pre>
|
98
|
+
(REF ` MY) U (MY ` REF).
|
99
|
+
</pre>
|
100
|
+
<p>
|
101
|
+
In queries, %s will be replaced by given schemas.
|
102
|
+
</p>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<div id="method-list">
|
110
|
+
<h3 class="section-bar">Methods</h3>
|
111
|
+
|
112
|
+
<div class="name-list">
|
113
|
+
<a href="#M000429">assertion</a>
|
114
|
+
<a href="#M000427">prologue</a>
|
115
|
+
<a href="#M000428">run_impl</a>
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
|
122
|
+
<!-- if includes -->
|
123
|
+
<div id="includes">
|
124
|
+
<h3 class="section-bar">Included Modules</h3>
|
125
|
+
|
126
|
+
<div id="includes-list">
|
127
|
+
<span class="include-name">Concrete</span>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
|
131
|
+
<div id="section">
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<!-- if method_list -->
|
141
|
+
<div id="methods">
|
142
|
+
<h3 class="section-bar">Protected Instance methods</h3>
|
143
|
+
|
144
|
+
<div id="method-M000429" class="method-detail">
|
145
|
+
<a name="M000429"></a>
|
146
|
+
|
147
|
+
<div class="method-heading">
|
148
|
+
<a href="#M000429" class="method-signature">
|
149
|
+
<span class="method-name">assertion</span><span class="method-args">()</span>
|
150
|
+
</a>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
<div class="method-description">
|
154
|
+
<p><a class="source-toggle" href="#"
|
155
|
+
onclick="toggleCode('M000429-source');return false;">[Source]</a></p>
|
156
|
+
<div class="method-source-code" id="M000429-source">
|
157
|
+
<pre>
|
158
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/SqlQuery.rb, line 63</span>
|
159
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assertion</span>
|
160
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@delta</span>.<span class="ruby-identifier">nil?</span>
|
161
|
+
<span class="ruby-ivar">@log</span>.<span class="ruby-identifier">diff_output</span> = <span class="ruby-ivar">@delta</span>
|
162
|
+
<span class="ruby-identifier">fail</span>(<span class="ruby-value str">'Delta not empty'</span>)
|
163
|
+
<span class="ruby-keyword kw">end</span>
|
164
|
+
<span class="ruby-keyword kw">super</span>
|
165
|
+
<span class="ruby-keyword kw">end</span>
|
166
|
+
</pre>
|
167
|
+
</div>
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
<div id="method-M000427" class="method-detail">
|
172
|
+
<a name="M000427"></a>
|
173
|
+
|
174
|
+
<div class="method-heading">
|
175
|
+
<a href="#M000427" class="method-signature">
|
176
|
+
<span class="method-name">prologue</span><span class="method-args">()</span>
|
177
|
+
</a>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div class="method-description">
|
181
|
+
<p>
|
182
|
+
Methods
|
183
|
+
</p>
|
184
|
+
<p><a class="source-toggle" href="#"
|
185
|
+
onclick="toggleCode('M000427-source');return false;">[Source]</a></p>
|
186
|
+
<div class="method-source-code" id="M000427-source">
|
187
|
+
<pre>
|
188
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/SqlQuery.rb, line 35</span>
|
189
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prologue</span>
|
190
|
+
<span class="ruby-keyword kw">super</span>
|
191
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@@db</span>.<span class="ruby-identifier">nil?</span>
|
192
|
+
<span class="ruby-identifier">require</span> <span class="ruby-value str">'dbi'</span>
|
193
|
+
<span class="ruby-comment cmt"># Check if driver is available</span>
|
194
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">DBI</span>.<span class="ruby-identifier">available_drivers</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/#@driver/</span>
|
195
|
+
<span class="ruby-identifier">raise_error</span>(<span class="ruby-value str">"Unknown driver: #@driver"</span>)
|
196
|
+
<span class="ruby-keyword kw">else</span>
|
197
|
+
<span class="ruby-comment cmt"># Start DB connection</span>
|
198
|
+
<span class="ruby-ivar">@@db</span> = <span class="ruby-constant">DBI</span>.<span class="ruby-identifier">connect</span>(<span class="ruby-value str">"DBI:#@driver:host=#@host;database=#@database"</span>,
|
199
|
+
<span class="ruby-ivar">@user</span>, <span class="ruby-ivar">@passwd</span>)
|
200
|
+
<span class="ruby-keyword kw">end</span>
|
201
|
+
<span class="ruby-keyword kw">end</span>
|
202
|
+
<span class="ruby-keyword kw">end</span>
|
203
|
+
</pre>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
|
208
|
+
<div id="method-M000428" class="method-detail">
|
209
|
+
<a name="M000428"></a>
|
210
|
+
|
211
|
+
<div class="method-heading">
|
212
|
+
<a href="#M000428" class="method-signature">
|
213
|
+
<span class="method-name">run_impl</span><span class="method-args">()</span>
|
214
|
+
</a>
|
215
|
+
</div>
|
216
|
+
|
217
|
+
<div class="method-description">
|
218
|
+
<p><a class="source-toggle" href="#"
|
219
|
+
onclick="toggleCode('M000428-source');return false;">[Source]</a></p>
|
220
|
+
<div class="method-source-code" id="M000428-source">
|
221
|
+
<pre>
|
222
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/SqlQuery.rb, line 52</span>
|
223
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_impl</span>
|
224
|
+
<span class="ruby-ivar">@delta</span> = <span class="ruby-keyword kw">nil</span>
|
225
|
+
<span class="ruby-keyword kw">begin</span>
|
226
|
+
<span class="ruby-ivar">@delta</span> = <span class="ruby-identifier">perform_delta</span>
|
227
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">DBI</span><span class="ruby-operator">::</span><span class="ruby-constant">DatabaseError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
228
|
+
<span class="ruby-identifier">fail</span>(<span class="ruby-identifier">ex</span>)
|
229
|
+
<span class="ruby-keyword kw">end</span>
|
230
|
+
<span class="ruby-keyword kw">end</span>
|
231
|
+
</pre>
|
232
|
+
</div>
|
233
|
+
</div>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
|
237
|
+
</div>
|
238
|
+
|
239
|
+
|
240
|
+
</div>
|
241
|
+
|
242
|
+
|
243
|
+
<div id="validator-badges">
|
244
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
245
|
+
</div>
|
246
|
+
|
247
|
+
</body>
|
248
|
+
</html>
|
@@ -0,0 +1,2847 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: TTK::Strategies::Strategy</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">TTK::Strategies::Strategy</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/ttk/strategies/Strategy/assert_eval_rb.html">
|
59
|
+
lib/ttk/strategies/Strategy/assert_eval.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../../../files/lib/ttk/strategies/Strategy_rb.html">
|
63
|
+
lib/ttk/strategies/Strategy.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../../../files/lib/ttk/strategies/Strategy_rb.html">
|
67
|
+
lib/ttk/strategies/Strategy.rb
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
|
73
|
+
<tr class="top-aligned-row">
|
74
|
+
<td><strong>Parent:</strong></td>
|
75
|
+
<td>
|
76
|
+
Object
|
77
|
+
</td>
|
78
|
+
</tr>
|
79
|
+
</table>
|
80
|
+
</div>
|
81
|
+
<!-- banner header -->
|
82
|
+
|
83
|
+
<div id="bodyContent">
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
<div id="contextContent">
|
88
|
+
|
89
|
+
<div id="description">
|
90
|
+
<p>
|
91
|
+
This is the base class for anything <em>testable</em>. It provides some
|
92
|
+
basics attributes like the name of the test.
|
93
|
+
</p>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
</div>
|
99
|
+
|
100
|
+
<div id="method-list">
|
101
|
+
<h3 class="section-bar">Methods</h3>
|
102
|
+
|
103
|
+
<div class="name-list">
|
104
|
+
<a href="#M000297">abort</a>
|
105
|
+
<a href="#M000257">abort</a>
|
106
|
+
<a href="#M000288">abort_hook</a>
|
107
|
+
<a href="#M000248">abort_hook</a>
|
108
|
+
<a href="#M000283">assertion</a>
|
109
|
+
<a href="#M000243">assertion</a>
|
110
|
+
<a href="#M000234">assign</a>
|
111
|
+
<a href="#M000274">assign</a>
|
112
|
+
<a href="#M000233">assign_at_last</a>
|
113
|
+
<a href="#M000273">assign_at_last</a>
|
114
|
+
<a href="#M000232">assign_one</a>
|
115
|
+
<a href="#M000272">assign_one</a>
|
116
|
+
<a href="#M000270">call</a>
|
117
|
+
<a href="#M000230">call</a>
|
118
|
+
<a href="#M000239">check_assertion</a>
|
119
|
+
<a href="#M000279">check_assertion</a>
|
120
|
+
<a href="#M000238">clean_instance_variables</a>
|
121
|
+
<a href="#M000278">clean_instance_variables</a>
|
122
|
+
<a href="#M000302">display_unexpected_exc</a>
|
123
|
+
<a href="#M000262">display_unexpected_exc</a>
|
124
|
+
<a href="#M000303">display_unexpected_synflow_exc</a>
|
125
|
+
<a href="#M000263">display_unexpected_synflow_exc</a>
|
126
|
+
<a href="#M000285">epilogue</a>
|
127
|
+
<a href="#M000245">epilogue</a>
|
128
|
+
<a href="#M000287">error_hook</a>
|
129
|
+
<a href="#M000247">error_hook</a>
|
130
|
+
<a href="#M000296">fail</a>
|
131
|
+
<a href="#M000256">fail</a>
|
132
|
+
<a href="#M000246">failed_hook</a>
|
133
|
+
<a href="#M000286">failed_hook</a>
|
134
|
+
<a href="#M000236">initialize_flow_factory</a>
|
135
|
+
<a href="#M000276">initialize_flow_factory</a>
|
136
|
+
<a href="#M000228">new</a>
|
137
|
+
<a href="#M000268">new</a>
|
138
|
+
<a href="#M000253">pass</a>
|
139
|
+
<a href="#M000293">pass</a>
|
140
|
+
<a href="#M000250">pass_hook</a>
|
141
|
+
<a href="#M000290">pass_hook</a>
|
142
|
+
<a href="#M000284">post_assertion</a>
|
143
|
+
<a href="#M000244">post_assertion</a>
|
144
|
+
<a href="#M000240">pre_assertion</a>
|
145
|
+
<a href="#M000280">pre_assertion</a>
|
146
|
+
<a href="#M000241">prologue</a>
|
147
|
+
<a href="#M000281">prologue</a>
|
148
|
+
<a href="#M000295">raise_error</a>
|
149
|
+
<a href="#M000255">raise_error</a>
|
150
|
+
<a href="#M000251">raise_status</a>
|
151
|
+
<a href="#M000291">raise_status</a>
|
152
|
+
<a href="#M000252">raise_status_custom</a>
|
153
|
+
<a href="#M000292">raise_status_custom</a>
|
154
|
+
<a href="#M000235">reject</a>
|
155
|
+
<a href="#M000275">reject</a>
|
156
|
+
<a href="#M000229">run</a>
|
157
|
+
<a href="#M000269">run</a>
|
158
|
+
<a href="#M000282">run_impl</a>
|
159
|
+
<a href="#M000242">run_impl</a>
|
160
|
+
<a href="#M000261">running?</a>
|
161
|
+
<a href="#M000301">running?</a>
|
162
|
+
<a href="#M000254">skip</a>
|
163
|
+
<a href="#M000294">skip</a>
|
164
|
+
<a href="#M000249">skip_hook</a>
|
165
|
+
<a href="#M000289">skip_hook</a>
|
166
|
+
<a href="#M000277">skip_if_cached</a>
|
167
|
+
<a href="#M000237">skip_if_cached</a>
|
168
|
+
<a href="#M000305">strategy</a>
|
169
|
+
<a href="#M000265">strategy</a>
|
170
|
+
<a href="#M000306">strategy=</a>
|
171
|
+
<a href="#M000266">strategy=</a>
|
172
|
+
<a href="#M000264">symbols=</a>
|
173
|
+
<a href="#M000304">symbols=</a>
|
174
|
+
<a href="#M000267">symtbl=</a>
|
175
|
+
<a href="#M000307">symtbl=</a>
|
176
|
+
<a href="#M000298">testify</a>
|
177
|
+
<a href="#M000258">testify</a>
|
178
|
+
<a href="#M000300">timeout=</a>
|
179
|
+
<a href="#M000260">timeout=</a>
|
180
|
+
<a href="#M000299">to_s</a>
|
181
|
+
<a href="#M000259">to_s</a>
|
182
|
+
<a href="#M000271">wclass=</a>
|
183
|
+
<a href="#M000231">wclass=</a>
|
184
|
+
</div>
|
185
|
+
</div>
|
186
|
+
|
187
|
+
</div>
|
188
|
+
|
189
|
+
|
190
|
+
<!-- if includes -->
|
191
|
+
<div id="includes">
|
192
|
+
<h3 class="section-bar">Included Modules</h3>
|
193
|
+
|
194
|
+
<div id="includes-list">
|
195
|
+
<span class="include-name">Abstract</span>
|
196
|
+
<span class="include-name"><a href="Strategy/AttributedClass.html">AttributedClass</a></span>
|
197
|
+
<span class="include-name">Abstract</span>
|
198
|
+
<span class="include-name"><a href="Strategy/AttributedClass.html">AttributedClass</a></span>
|
199
|
+
</div>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
<div id="section">
|
203
|
+
|
204
|
+
<div id="class-list">
|
205
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
206
|
+
|
207
|
+
Module <a href="Strategy/AttributedClass.html" class="link">TTK::Strategies::Strategy::AttributedClass</a><br />
|
208
|
+
Class <a href="Strategy/AssertEval.html" class="link">TTK::Strategies::Strategy::AssertEval</a><br />
|
209
|
+
Class <a href="Strategy/Failure.html" class="link">TTK::Strategies::Strategy::Failure</a><br />
|
210
|
+
|
211
|
+
</div>
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
<div id="attribute-list">
|
217
|
+
<h3 class="section-bar">Attributes</h3>
|
218
|
+
|
219
|
+
<div class="name-list">
|
220
|
+
<table>
|
221
|
+
<tr class="top-aligned-row context-row">
|
222
|
+
<td class="context-item-name">status</td>
|
223
|
+
<td class="context-item-value"> [R] </td>
|
224
|
+
<td class="context-item-desc">
|
225
|
+
Accessors
|
226
|
+
|
227
|
+
</td>
|
228
|
+
</tr>
|
229
|
+
<tr class="top-aligned-row context-row">
|
230
|
+
<td class="context-item-name">status</td>
|
231
|
+
<td class="context-item-value"> [R] </td>
|
232
|
+
<td class="context-item-desc">
|
233
|
+
Accessors
|
234
|
+
|
235
|
+
</td>
|
236
|
+
</tr>
|
237
|
+
<tr class="top-aligned-row context-row">
|
238
|
+
<td class="context-item-name">symtbl</td>
|
239
|
+
<td class="context-item-value"> [R] </td>
|
240
|
+
<td class="context-item-desc">
|
241
|
+
Accessors
|
242
|
+
|
243
|
+
</td>
|
244
|
+
</tr>
|
245
|
+
<tr class="top-aligned-row context-row">
|
246
|
+
<td class="context-item-name">symtbl</td>
|
247
|
+
<td class="context-item-value"> [R] </td>
|
248
|
+
<td class="context-item-desc">
|
249
|
+
Accessors
|
250
|
+
|
251
|
+
</td>
|
252
|
+
</tr>
|
253
|
+
</table>
|
254
|
+
</div>
|
255
|
+
</div>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
<!-- if method_list -->
|
260
|
+
<div id="methods">
|
261
|
+
<h3 class="section-bar">Public Class methods</h3>
|
262
|
+
|
263
|
+
<div id="method-M000228" class="method-detail">
|
264
|
+
<a name="M000228"></a>
|
265
|
+
|
266
|
+
<div class="method-heading">
|
267
|
+
<a href="#M000228" class="method-signature">
|
268
|
+
<span class="method-name">new</span><span class="method-args">( &block )</span>
|
269
|
+
</a>
|
270
|
+
</div>
|
271
|
+
|
272
|
+
<div class="method-description">
|
273
|
+
<p>
|
274
|
+
Create a new <a href="Strategy.html">Strategy</a> with the given optional
|
275
|
+
document.
|
276
|
+
</p>
|
277
|
+
<p><a class="source-toggle" href="#"
|
278
|
+
onclick="toggleCode('M000228-source');return false;">[Source]</a></p>
|
279
|
+
<div class="method-source-code" id="M000228-source">
|
280
|
+
<pre>
|
281
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 62</span>
|
282
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> ( <span class="ruby-operator">&</span><span class="ruby-identifier">block</span> )
|
283
|
+
<span class="ruby-ivar">@status</span> = <span class="ruby-constant">StartStatus</span>.<span class="ruby-identifier">new</span>
|
284
|
+
<span class="ruby-ivar">@symbols</span> = {}
|
285
|
+
<span class="ruby-identifier">initialize_attributes</span>
|
286
|
+
<span class="ruby-ivar">@save</span> = <span class="ruby-keyword kw">nil</span>
|
287
|
+
<span class="ruby-ivar">@reject</span> = <span class="ruby-constant">Set</span>.<span class="ruby-identifier">new</span>
|
288
|
+
<span class="ruby-identifier">block</span>[<span class="ruby-keyword kw">self</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
289
|
+
<span class="ruby-keyword kw">end</span>
|
290
|
+
</pre>
|
291
|
+
</div>
|
292
|
+
</div>
|
293
|
+
</div>
|
294
|
+
|
295
|
+
<div id="method-M000268" class="method-detail">
|
296
|
+
<a name="M000268"></a>
|
297
|
+
|
298
|
+
<div class="method-heading">
|
299
|
+
<a href="#M000268" class="method-signature">
|
300
|
+
<span class="method-name">new</span><span class="method-args">( &block )</span>
|
301
|
+
</a>
|
302
|
+
</div>
|
303
|
+
|
304
|
+
<div class="method-description">
|
305
|
+
<p>
|
306
|
+
Create a new <a href="Strategy.html">Strategy</a> with the given optional
|
307
|
+
document.
|
308
|
+
</p>
|
309
|
+
<p><a class="source-toggle" href="#"
|
310
|
+
onclick="toggleCode('M000268-source');return false;">[Source]</a></p>
|
311
|
+
<div class="method-source-code" id="M000268-source">
|
312
|
+
<pre>
|
313
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 62</span>
|
314
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> ( <span class="ruby-operator">&</span><span class="ruby-identifier">block</span> )
|
315
|
+
<span class="ruby-ivar">@status</span> = <span class="ruby-constant">StartStatus</span>.<span class="ruby-identifier">new</span>
|
316
|
+
<span class="ruby-ivar">@symbols</span> = {}
|
317
|
+
<span class="ruby-identifier">initialize_attributes</span>
|
318
|
+
<span class="ruby-ivar">@save</span> = <span class="ruby-keyword kw">nil</span>
|
319
|
+
<span class="ruby-ivar">@reject</span> = <span class="ruby-constant">Set</span>.<span class="ruby-identifier">new</span>
|
320
|
+
<span class="ruby-identifier">block</span>[<span class="ruby-keyword kw">self</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
321
|
+
<span class="ruby-keyword kw">end</span>
|
322
|
+
</pre>
|
323
|
+
</div>
|
324
|
+
</div>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
328
|
+
|
329
|
+
<div id="method-M000297" class="method-detail">
|
330
|
+
<a name="M000297"></a>
|
331
|
+
|
332
|
+
<div class="method-heading">
|
333
|
+
<a href="#M000297" class="method-signature">
|
334
|
+
<span class="method-name">abort</span><span class="method-args">( message='abort explicitly' )</span>
|
335
|
+
</a>
|
336
|
+
</div>
|
337
|
+
|
338
|
+
<div class="method-description">
|
339
|
+
<p>
|
340
|
+
<a href="Abort.html">Abort</a> the test explicitly.
|
341
|
+
</p>
|
342
|
+
<p><a class="source-toggle" href="#"
|
343
|
+
onclick="toggleCode('M000297-source');return false;">[Source]</a></p>
|
344
|
+
<div class="method-source-code" id="M000297-source">
|
345
|
+
<pre>
|
346
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 524</span>
|
347
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abort</span> ( <span class="ruby-identifier">message</span>=<span class="ruby-value str">'abort explicitly'</span> )
|
348
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">:abort</span> <span class="ruby-comment cmt"># FIXME</span>
|
349
|
+
<span class="ruby-identifier">raise_status</span> <span class="ruby-constant">AbortStatus</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>], <span class="ruby-identifier">message</span>)
|
350
|
+
<span class="ruby-keyword kw">end</span>
|
351
|
+
</pre>
|
352
|
+
</div>
|
353
|
+
</div>
|
354
|
+
</div>
|
355
|
+
|
356
|
+
<div id="method-M000257" class="method-detail">
|
357
|
+
<a name="M000257"></a>
|
358
|
+
|
359
|
+
<div class="method-heading">
|
360
|
+
<a href="#M000257" class="method-signature">
|
361
|
+
<span class="method-name">abort</span><span class="method-args">( message='abort explicitly' )</span>
|
362
|
+
</a>
|
363
|
+
</div>
|
364
|
+
|
365
|
+
<div class="method-description">
|
366
|
+
<p>
|
367
|
+
<a href="Abort.html">Abort</a> the test explicitly.
|
368
|
+
</p>
|
369
|
+
<p><a class="source-toggle" href="#"
|
370
|
+
onclick="toggleCode('M000257-source');return false;">[Source]</a></p>
|
371
|
+
<div class="method-source-code" id="M000257-source">
|
372
|
+
<pre>
|
373
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 524</span>
|
374
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abort</span> ( <span class="ruby-identifier">message</span>=<span class="ruby-value str">'abort explicitly'</span> )
|
375
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">:abort</span> <span class="ruby-comment cmt"># FIXME</span>
|
376
|
+
<span class="ruby-identifier">raise_status</span> <span class="ruby-constant">AbortStatus</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>], <span class="ruby-identifier">message</span>)
|
377
|
+
<span class="ruby-keyword kw">end</span>
|
378
|
+
</pre>
|
379
|
+
</div>
|
380
|
+
</div>
|
381
|
+
</div>
|
382
|
+
|
383
|
+
<div id="method-M000234" class="method-detail">
|
384
|
+
<a name="M000234"></a>
|
385
|
+
|
386
|
+
<div class="method-heading">
|
387
|
+
<a href="#M000234" class="method-signature">
|
388
|
+
<span class="method-name">assign</span><span class="method-args">(hsh)</span>
|
389
|
+
</a>
|
390
|
+
</div>
|
391
|
+
|
392
|
+
<div class="method-description">
|
393
|
+
<p>
|
394
|
+
Assign a <tt>hsh</tt> keeping at last the attribute referenced by <em><a
|
395
|
+
href="Strategy.html#M000233">assign_at_last</a></em>.
|
396
|
+
</p>
|
397
|
+
<p><a class="source-toggle" href="#"
|
398
|
+
onclick="toggleCode('M000234-source');return false;">[Source]</a></p>
|
399
|
+
<div class="method-source-code" id="M000234-source">
|
400
|
+
<pre>
|
401
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 256</span>
|
402
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assign</span>(<span class="ruby-identifier">hsh</span>)
|
403
|
+
<span class="ruby-identifier">last</span> = <span class="ruby-identifier">assign_at_last</span>
|
404
|
+
<span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">each_pair</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span> <span class="ruby-identifier">assign_one</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">last</span> }
|
405
|
+
<span class="ruby-identifier">assign_one</span>(<span class="ruby-identifier">last</span>, <span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">last</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">last</span>
|
406
|
+
<span class="ruby-keyword kw">end</span>
|
407
|
+
</pre>
|
408
|
+
</div>
|
409
|
+
</div>
|
410
|
+
</div>
|
411
|
+
|
412
|
+
<div id="method-M000274" class="method-detail">
|
413
|
+
<a name="M000274"></a>
|
414
|
+
|
415
|
+
<div class="method-heading">
|
416
|
+
<a href="#M000274" class="method-signature">
|
417
|
+
<span class="method-name">assign</span><span class="method-args">(hsh)</span>
|
418
|
+
</a>
|
419
|
+
</div>
|
420
|
+
|
421
|
+
<div class="method-description">
|
422
|
+
<p>
|
423
|
+
Assign a <tt>hsh</tt> keeping at last the attribute referenced by <em><a
|
424
|
+
href="Strategy.html#M000233">assign_at_last</a></em>.
|
425
|
+
</p>
|
426
|
+
<p><a class="source-toggle" href="#"
|
427
|
+
onclick="toggleCode('M000274-source');return false;">[Source]</a></p>
|
428
|
+
<div class="method-source-code" id="M000274-source">
|
429
|
+
<pre>
|
430
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 256</span>
|
431
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assign</span>(<span class="ruby-identifier">hsh</span>)
|
432
|
+
<span class="ruby-identifier">last</span> = <span class="ruby-identifier">assign_at_last</span>
|
433
|
+
<span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">each_pair</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span> <span class="ruby-identifier">assign_one</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">last</span> }
|
434
|
+
<span class="ruby-identifier">assign_one</span>(<span class="ruby-identifier">last</span>, <span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">last</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">last</span>
|
435
|
+
<span class="ruby-keyword kw">end</span>
|
436
|
+
</pre>
|
437
|
+
</div>
|
438
|
+
</div>
|
439
|
+
</div>
|
440
|
+
|
441
|
+
<div id="method-M000270" class="method-detail">
|
442
|
+
<a name="M000270"></a>
|
443
|
+
|
444
|
+
<div class="method-heading">
|
445
|
+
<span class="method-name">call</span><span class="method-args">( log=@symtbl[:log] )</span>
|
446
|
+
</div>
|
447
|
+
|
448
|
+
<div class="method-description">
|
449
|
+
<p>
|
450
|
+
Alias for <a href="Strategy.html#M000229">run</a>
|
451
|
+
</p>
|
452
|
+
</div>
|
453
|
+
</div>
|
454
|
+
|
455
|
+
<div id="method-M000230" class="method-detail">
|
456
|
+
<a name="M000230"></a>
|
457
|
+
|
458
|
+
<div class="method-heading">
|
459
|
+
<span class="method-name">call</span><span class="method-args">( log=@symtbl[:log] )</span>
|
460
|
+
</div>
|
461
|
+
|
462
|
+
<div class="method-description">
|
463
|
+
<p>
|
464
|
+
Alias for <a href="Strategy.html#M000229">run</a>
|
465
|
+
</p>
|
466
|
+
</div>
|
467
|
+
</div>
|
468
|
+
|
469
|
+
<div id="method-M000238" class="method-detail">
|
470
|
+
<a name="M000238"></a>
|
471
|
+
|
472
|
+
<div class="method-heading">
|
473
|
+
<a href="#M000238" class="method-signature">
|
474
|
+
<span class="method-name">clean_instance_variables</span><span class="method-args">()</span>
|
475
|
+
</a>
|
476
|
+
</div>
|
477
|
+
|
478
|
+
<div class="method-description">
|
479
|
+
<p><a class="source-toggle" href="#"
|
480
|
+
onclick="toggleCode('M000238-source');return false;">[Source]</a></p>
|
481
|
+
<div class="method-source-code" id="M000238-source">
|
482
|
+
<pre>
|
483
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 347</span>
|
484
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clean_instance_variables</span>
|
485
|
+
<span class="ruby-identifier">attrs</span> = <span class="ruby-constant">Set</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-node">"@#{a.name}"</span> })
|
486
|
+
<span class="ruby-identifier">vars</span> = <span class="ruby-constant">Set</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">instance_variables</span>)
|
487
|
+
<span class="ruby-identifier">exceptions</span> = <span class="ruby-constant">Set</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">%w[ @status @thread ]</span>)
|
488
|
+
(<span class="ruby-identifier">vars</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">attrs</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">exceptions</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">var</span><span class="ruby-operator">|</span>
|
489
|
+
<span class="ruby-identifier">remove_instance_variable</span> <span class="ruby-identifier">var</span>
|
490
|
+
<span class="ruby-keyword kw">end</span>
|
491
|
+
<span class="ruby-keyword kw">end</span>
|
492
|
+
</pre>
|
493
|
+
</div>
|
494
|
+
</div>
|
495
|
+
</div>
|
496
|
+
|
497
|
+
<div id="method-M000278" class="method-detail">
|
498
|
+
<a name="M000278"></a>
|
499
|
+
|
500
|
+
<div class="method-heading">
|
501
|
+
<a href="#M000278" class="method-signature">
|
502
|
+
<span class="method-name">clean_instance_variables</span><span class="method-args">()</span>
|
503
|
+
</a>
|
504
|
+
</div>
|
505
|
+
|
506
|
+
<div class="method-description">
|
507
|
+
<p><a class="source-toggle" href="#"
|
508
|
+
onclick="toggleCode('M000278-source');return false;">[Source]</a></p>
|
509
|
+
<div class="method-source-code" id="M000278-source">
|
510
|
+
<pre>
|
511
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 347</span>
|
512
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clean_instance_variables</span>
|
513
|
+
<span class="ruby-identifier">attrs</span> = <span class="ruby-constant">Set</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-node">"@#{a.name}"</span> })
|
514
|
+
<span class="ruby-identifier">vars</span> = <span class="ruby-constant">Set</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">instance_variables</span>)
|
515
|
+
<span class="ruby-identifier">exceptions</span> = <span class="ruby-constant">Set</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">%w[ @status @thread ]</span>)
|
516
|
+
(<span class="ruby-identifier">vars</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">attrs</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">exceptions</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">var</span><span class="ruby-operator">|</span>
|
517
|
+
<span class="ruby-identifier">remove_instance_variable</span> <span class="ruby-identifier">var</span>
|
518
|
+
<span class="ruby-keyword kw">end</span>
|
519
|
+
<span class="ruby-keyword kw">end</span>
|
520
|
+
</pre>
|
521
|
+
</div>
|
522
|
+
</div>
|
523
|
+
</div>
|
524
|
+
|
525
|
+
<div id="method-M000302" class="method-detail">
|
526
|
+
<a name="M000302"></a>
|
527
|
+
|
528
|
+
<div class="method-heading">
|
529
|
+
<a href="#M000302" class="method-signature">
|
530
|
+
<span class="method-name">display_unexpected_exc</span><span class="method-args">( exc )</span>
|
531
|
+
</a>
|
532
|
+
</div>
|
533
|
+
|
534
|
+
<div class="method-description">
|
535
|
+
<p><a class="source-toggle" href="#"
|
536
|
+
onclick="toggleCode('M000302-source');return false;">[Source]</a></p>
|
537
|
+
<div class="method-source-code" id="M000302-source">
|
538
|
+
<pre>
|
539
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 554</span>
|
540
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">display_unexpected_exc</span> ( <span class="ruby-identifier">exc</span> )
|
541
|
+
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">'unexpected exception'</span>
|
542
|
+
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">exc</span>.<span class="ruby-identifier">long_pp</span>
|
543
|
+
<span class="ruby-keyword kw">end</span>
|
544
|
+
</pre>
|
545
|
+
</div>
|
546
|
+
</div>
|
547
|
+
</div>
|
548
|
+
|
549
|
+
<div id="method-M000262" class="method-detail">
|
550
|
+
<a name="M000262"></a>
|
551
|
+
|
552
|
+
<div class="method-heading">
|
553
|
+
<a href="#M000262" class="method-signature">
|
554
|
+
<span class="method-name">display_unexpected_exc</span><span class="method-args">( exc )</span>
|
555
|
+
</a>
|
556
|
+
</div>
|
557
|
+
|
558
|
+
<div class="method-description">
|
559
|
+
<p><a class="source-toggle" href="#"
|
560
|
+
onclick="toggleCode('M000262-source');return false;">[Source]</a></p>
|
561
|
+
<div class="method-source-code" id="M000262-source">
|
562
|
+
<pre>
|
563
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 554</span>
|
564
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">display_unexpected_exc</span> ( <span class="ruby-identifier">exc</span> )
|
565
|
+
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">'unexpected exception'</span>
|
566
|
+
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">exc</span>.<span class="ruby-identifier">long_pp</span>
|
567
|
+
<span class="ruby-keyword kw">end</span>
|
568
|
+
</pre>
|
569
|
+
</div>
|
570
|
+
</div>
|
571
|
+
</div>
|
572
|
+
|
573
|
+
<div id="method-M000303" class="method-detail">
|
574
|
+
<a name="M000303"></a>
|
575
|
+
|
576
|
+
<div class="method-heading">
|
577
|
+
<a href="#M000303" class="method-signature">
|
578
|
+
<span class="method-name">display_unexpected_synflow_exc</span><span class="method-args">( exc, arg )</span>
|
579
|
+
</a>
|
580
|
+
</div>
|
581
|
+
|
582
|
+
<div class="method-description">
|
583
|
+
<p><a class="source-toggle" href="#"
|
584
|
+
onclick="toggleCode('M000303-source');return false;">[Source]</a></p>
|
585
|
+
<div class="method-source-code" id="M000303-source">
|
586
|
+
<pre>
|
587
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 559</span>
|
588
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">display_unexpected_synflow_exc</span> ( <span class="ruby-identifier">exc</span>, <span class="ruby-identifier">arg</span> )
|
589
|
+
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"unexpected synflow exception (#{arg})"</span>
|
590
|
+
<span class="ruby-keyword kw">end</span>
|
591
|
+
</pre>
|
592
|
+
</div>
|
593
|
+
</div>
|
594
|
+
</div>
|
595
|
+
|
596
|
+
<div id="method-M000263" class="method-detail">
|
597
|
+
<a name="M000263"></a>
|
598
|
+
|
599
|
+
<div class="method-heading">
|
600
|
+
<a href="#M000263" class="method-signature">
|
601
|
+
<span class="method-name">display_unexpected_synflow_exc</span><span class="method-args">( exc, arg )</span>
|
602
|
+
</a>
|
603
|
+
</div>
|
604
|
+
|
605
|
+
<div class="method-description">
|
606
|
+
<p><a class="source-toggle" href="#"
|
607
|
+
onclick="toggleCode('M000263-source');return false;">[Source]</a></p>
|
608
|
+
<div class="method-source-code" id="M000263-source">
|
609
|
+
<pre>
|
610
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 559</span>
|
611
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">display_unexpected_synflow_exc</span> ( <span class="ruby-identifier">exc</span>, <span class="ruby-identifier">arg</span> )
|
612
|
+
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"unexpected synflow exception (#{arg})"</span>
|
613
|
+
<span class="ruby-keyword kw">end</span>
|
614
|
+
</pre>
|
615
|
+
</div>
|
616
|
+
</div>
|
617
|
+
</div>
|
618
|
+
|
619
|
+
<div id="method-M000296" class="method-detail">
|
620
|
+
<a name="M000296"></a>
|
621
|
+
|
622
|
+
<div class="method-heading">
|
623
|
+
<a href="#M000296" class="method-signature">
|
624
|
+
<span class="method-name">fail</span><span class="method-args">( *args )</span>
|
625
|
+
</a>
|
626
|
+
</div>
|
627
|
+
|
628
|
+
<div class="method-description">
|
629
|
+
<p>
|
630
|
+
Force the test to fail
|
631
|
+
</p>
|
632
|
+
<p><a class="source-toggle" href="#"
|
633
|
+
onclick="toggleCode('M000296-source');return false;">[Source]</a></p>
|
634
|
+
<div class="method-source-code" id="M000296-source">
|
635
|
+
<pre>
|
636
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 519</span>
|
637
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fail</span> ( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
638
|
+
<span class="ruby-identifier">raise_status_custom</span> <span class="ruby-constant">FailStatus</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
|
639
|
+
<span class="ruby-keyword kw">end</span>
|
640
|
+
</pre>
|
641
|
+
</div>
|
642
|
+
</div>
|
643
|
+
</div>
|
644
|
+
|
645
|
+
<div id="method-M000256" class="method-detail">
|
646
|
+
<a name="M000256"></a>
|
647
|
+
|
648
|
+
<div class="method-heading">
|
649
|
+
<a href="#M000256" class="method-signature">
|
650
|
+
<span class="method-name">fail</span><span class="method-args">( *args )</span>
|
651
|
+
</a>
|
652
|
+
</div>
|
653
|
+
|
654
|
+
<div class="method-description">
|
655
|
+
<p>
|
656
|
+
Force the test to fail
|
657
|
+
</p>
|
658
|
+
<p><a class="source-toggle" href="#"
|
659
|
+
onclick="toggleCode('M000256-source');return false;">[Source]</a></p>
|
660
|
+
<div class="method-source-code" id="M000256-source">
|
661
|
+
<pre>
|
662
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 519</span>
|
663
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fail</span> ( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
664
|
+
<span class="ruby-identifier">raise_status_custom</span> <span class="ruby-constant">FailStatus</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
|
665
|
+
<span class="ruby-keyword kw">end</span>
|
666
|
+
</pre>
|
667
|
+
</div>
|
668
|
+
</div>
|
669
|
+
</div>
|
670
|
+
|
671
|
+
<div id="method-M000236" class="method-detail">
|
672
|
+
<a name="M000236"></a>
|
673
|
+
|
674
|
+
<div class="method-heading">
|
675
|
+
<a href="#M000236" class="method-signature">
|
676
|
+
<span class="method-name">initialize_flow_factory</span><span class="method-args">()</span>
|
677
|
+
</a>
|
678
|
+
</div>
|
679
|
+
|
680
|
+
<div class="method-description">
|
681
|
+
<p><a class="source-toggle" href="#"
|
682
|
+
onclick="toggleCode('M000236-source');return false;">[Source]</a></p>
|
683
|
+
<div class="method-source-code" id="M000236-source">
|
684
|
+
<pre>
|
685
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 270</span>
|
686
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize_flow_factory</span>
|
687
|
+
<span class="ruby-identifier">factory</span> = <span class="ruby-constant">SynFlowFactory</span>.<span class="ruby-identifier">new</span>
|
688
|
+
<span class="ruby-identifier">factory</span> <span class="ruby-operator"><<</span>
|
689
|
+
{
|
690
|
+
<span class="ruby-identifier">:start_st</span> =<span class="ruby-operator">></span> {
|
691
|
+
<span class="ruby-identifier">:prologue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:prologue_st</span>,
|
692
|
+
<span class="ruby-identifier">:not_running?</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:start_st</span>,
|
693
|
+
<span class="ruby-identifier">:end_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:after_run_st</span>,
|
694
|
+
<span class="ruby-comment cmt"># :abort => :start_st,</span>
|
695
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
696
|
+
},
|
697
|
+
|
698
|
+
<span class="ruby-identifier">:prologue_st</span> =<span class="ruby-operator">></span> {
|
699
|
+
<span class="ruby-identifier">:begin_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:run_impl_st</span>,
|
700
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
701
|
+
},
|
702
|
+
|
703
|
+
<span class="ruby-identifier">:run_impl_st</span> =<span class="ruby-operator">></span> {
|
704
|
+
<span class="ruby-identifier">:prologue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:prologue_st</span>,
|
705
|
+
<span class="ruby-identifier">:end_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:after_run_st</span>,
|
706
|
+
<span class="ruby-identifier">:abort</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:abort_st</span>,
|
707
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
708
|
+
},
|
709
|
+
|
710
|
+
<span class="ruby-identifier">:after_run_st</span> =<span class="ruby-operator">></span> {
|
711
|
+
<span class="ruby-identifier">:epilogue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:epilogue_st</span>,
|
712
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
713
|
+
},
|
714
|
+
|
715
|
+
<span class="ruby-identifier">:epilogue_st</span> =<span class="ruby-operator">></span> {
|
716
|
+
<span class="ruby-identifier">:finish</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:start_st</span>,
|
717
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
718
|
+
},
|
719
|
+
|
720
|
+
<span class="ruby-identifier">:abort_st</span> =<span class="ruby-operator">></span> {
|
721
|
+
<span class="ruby-identifier">:end_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:after_run_abort_st</span>,
|
722
|
+
<span class="ruby-identifier">:abort</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:abort_st</span>,
|
723
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
724
|
+
},
|
725
|
+
|
726
|
+
<span class="ruby-identifier">:after_run_abort_st</span> =<span class="ruby-operator">></span> {
|
727
|
+
<span class="ruby-identifier">:epilogue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:epilogue_abort_st</span>,
|
728
|
+
<span class="ruby-identifier">:abort</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:after_run_abort_st</span>,
|
729
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
730
|
+
},
|
731
|
+
|
732
|
+
<span class="ruby-identifier">:epilogue_abort_st</span> =<span class="ruby-operator">></span> {
|
733
|
+
<span class="ruby-identifier">:finish</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:start_st</span>,
|
734
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
735
|
+
},
|
736
|
+
|
737
|
+
<span class="ruby-identifier">:error_st</span> =<span class="ruby-operator">></span> {
|
738
|
+
<span class="ruby-identifier">:prologue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:prologue_st</span>,
|
739
|
+
<span class="ruby-identifier">:begin_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:run_impl_st</span>,
|
740
|
+
<span class="ruby-identifier">:end_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:after_run_st</span>,
|
741
|
+
<span class="ruby-identifier">:epilogue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:epilogue_st</span>,
|
742
|
+
<span class="ruby-identifier">:finish</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:start_st</span>,
|
743
|
+
<span class="ruby-identifier">:no_running?</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>,
|
744
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>,
|
745
|
+
<span class="ruby-identifier">:abort</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:abort_st</span>
|
746
|
+
},
|
747
|
+
}
|
748
|
+
<span class="ruby-identifier">factory</span>.<span class="ruby-identifier">initial</span> = <span class="ruby-identifier">:start_st</span>
|
749
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow_factory</span>] = <span class="ruby-identifier">factory</span>
|
750
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>] = <span class="ruby-identifier">factory</span>.<span class="ruby-identifier">new_flow</span>
|
751
|
+
<span class="ruby-keyword kw">end</span>
|
752
|
+
</pre>
|
753
|
+
</div>
|
754
|
+
</div>
|
755
|
+
</div>
|
756
|
+
|
757
|
+
<div id="method-M000276" class="method-detail">
|
758
|
+
<a name="M000276"></a>
|
759
|
+
|
760
|
+
<div class="method-heading">
|
761
|
+
<a href="#M000276" class="method-signature">
|
762
|
+
<span class="method-name">initialize_flow_factory</span><span class="method-args">()</span>
|
763
|
+
</a>
|
764
|
+
</div>
|
765
|
+
|
766
|
+
<div class="method-description">
|
767
|
+
<p><a class="source-toggle" href="#"
|
768
|
+
onclick="toggleCode('M000276-source');return false;">[Source]</a></p>
|
769
|
+
<div class="method-source-code" id="M000276-source">
|
770
|
+
<pre>
|
771
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 270</span>
|
772
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize_flow_factory</span>
|
773
|
+
<span class="ruby-identifier">factory</span> = <span class="ruby-constant">SynFlowFactory</span>.<span class="ruby-identifier">new</span>
|
774
|
+
<span class="ruby-identifier">factory</span> <span class="ruby-operator"><<</span>
|
775
|
+
{
|
776
|
+
<span class="ruby-identifier">:start_st</span> =<span class="ruby-operator">></span> {
|
777
|
+
<span class="ruby-identifier">:prologue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:prologue_st</span>,
|
778
|
+
<span class="ruby-identifier">:not_running?</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:start_st</span>,
|
779
|
+
<span class="ruby-identifier">:end_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:after_run_st</span>,
|
780
|
+
<span class="ruby-comment cmt"># :abort => :start_st,</span>
|
781
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
782
|
+
},
|
783
|
+
|
784
|
+
<span class="ruby-identifier">:prologue_st</span> =<span class="ruby-operator">></span> {
|
785
|
+
<span class="ruby-identifier">:begin_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:run_impl_st</span>,
|
786
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
787
|
+
},
|
788
|
+
|
789
|
+
<span class="ruby-identifier">:run_impl_st</span> =<span class="ruby-operator">></span> {
|
790
|
+
<span class="ruby-identifier">:prologue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:prologue_st</span>,
|
791
|
+
<span class="ruby-identifier">:end_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:after_run_st</span>,
|
792
|
+
<span class="ruby-identifier">:abort</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:abort_st</span>,
|
793
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
794
|
+
},
|
795
|
+
|
796
|
+
<span class="ruby-identifier">:after_run_st</span> =<span class="ruby-operator">></span> {
|
797
|
+
<span class="ruby-identifier">:epilogue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:epilogue_st</span>,
|
798
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
799
|
+
},
|
800
|
+
|
801
|
+
<span class="ruby-identifier">:epilogue_st</span> =<span class="ruby-operator">></span> {
|
802
|
+
<span class="ruby-identifier">:finish</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:start_st</span>,
|
803
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
804
|
+
},
|
805
|
+
|
806
|
+
<span class="ruby-identifier">:abort_st</span> =<span class="ruby-operator">></span> {
|
807
|
+
<span class="ruby-identifier">:end_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:after_run_abort_st</span>,
|
808
|
+
<span class="ruby-identifier">:abort</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:abort_st</span>,
|
809
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
810
|
+
},
|
811
|
+
|
812
|
+
<span class="ruby-identifier">:after_run_abort_st</span> =<span class="ruby-operator">></span> {
|
813
|
+
<span class="ruby-identifier">:epilogue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:epilogue_abort_st</span>,
|
814
|
+
<span class="ruby-identifier">:abort</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:after_run_abort_st</span>,
|
815
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
816
|
+
},
|
817
|
+
|
818
|
+
<span class="ruby-identifier">:epilogue_abort_st</span> =<span class="ruby-operator">></span> {
|
819
|
+
<span class="ruby-identifier">:finish</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:start_st</span>,
|
820
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>
|
821
|
+
},
|
822
|
+
|
823
|
+
<span class="ruby-identifier">:error_st</span> =<span class="ruby-operator">></span> {
|
824
|
+
<span class="ruby-identifier">:prologue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:prologue_st</span>,
|
825
|
+
<span class="ruby-identifier">:begin_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:run_impl_st</span>,
|
826
|
+
<span class="ruby-identifier">:end_run_impl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:after_run_st</span>,
|
827
|
+
<span class="ruby-identifier">:epilogue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:epilogue_st</span>,
|
828
|
+
<span class="ruby-identifier">:finish</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:start_st</span>,
|
829
|
+
<span class="ruby-identifier">:no_running?</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>,
|
830
|
+
<span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:error_st</span>,
|
831
|
+
<span class="ruby-identifier">:abort</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:abort_st</span>
|
832
|
+
},
|
833
|
+
}
|
834
|
+
<span class="ruby-identifier">factory</span>.<span class="ruby-identifier">initial</span> = <span class="ruby-identifier">:start_st</span>
|
835
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow_factory</span>] = <span class="ruby-identifier">factory</span>
|
836
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>] = <span class="ruby-identifier">factory</span>.<span class="ruby-identifier">new_flow</span>
|
837
|
+
<span class="ruby-keyword kw">end</span>
|
838
|
+
</pre>
|
839
|
+
</div>
|
840
|
+
</div>
|
841
|
+
</div>
|
842
|
+
|
843
|
+
<div id="method-M000253" class="method-detail">
|
844
|
+
<a name="M000253"></a>
|
845
|
+
|
846
|
+
<div class="method-heading">
|
847
|
+
<a href="#M000253" class="method-signature">
|
848
|
+
<span class="method-name">pass</span><span class="method-args">()</span>
|
849
|
+
</a>
|
850
|
+
</div>
|
851
|
+
|
852
|
+
<div class="method-description">
|
853
|
+
<p>
|
854
|
+
Force the test to pass
|
855
|
+
</p>
|
856
|
+
<p><a class="source-toggle" href="#"
|
857
|
+
onclick="toggleCode('M000253-source');return false;">[Source]</a></p>
|
858
|
+
<div class="method-source-code" id="M000253-source">
|
859
|
+
<pre>
|
860
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 503</span>
|
861
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pass</span>
|
862
|
+
<span class="ruby-identifier">raise_status</span> <span class="ruby-constant">PassStatus</span>.<span class="ruby-identifier">new</span>
|
863
|
+
<span class="ruby-keyword kw">end</span>
|
864
|
+
</pre>
|
865
|
+
</div>
|
866
|
+
</div>
|
867
|
+
</div>
|
868
|
+
|
869
|
+
<div id="method-M000293" class="method-detail">
|
870
|
+
<a name="M000293"></a>
|
871
|
+
|
872
|
+
<div class="method-heading">
|
873
|
+
<a href="#M000293" class="method-signature">
|
874
|
+
<span class="method-name">pass</span><span class="method-args">()</span>
|
875
|
+
</a>
|
876
|
+
</div>
|
877
|
+
|
878
|
+
<div class="method-description">
|
879
|
+
<p>
|
880
|
+
Force the test to pass
|
881
|
+
</p>
|
882
|
+
<p><a class="source-toggle" href="#"
|
883
|
+
onclick="toggleCode('M000293-source');return false;">[Source]</a></p>
|
884
|
+
<div class="method-source-code" id="M000293-source">
|
885
|
+
<pre>
|
886
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 503</span>
|
887
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pass</span>
|
888
|
+
<span class="ruby-identifier">raise_status</span> <span class="ruby-constant">PassStatus</span>.<span class="ruby-identifier">new</span>
|
889
|
+
<span class="ruby-keyword kw">end</span>
|
890
|
+
</pre>
|
891
|
+
</div>
|
892
|
+
</div>
|
893
|
+
</div>
|
894
|
+
|
895
|
+
<div id="method-M000295" class="method-detail">
|
896
|
+
<a name="M000295"></a>
|
897
|
+
|
898
|
+
<div class="method-heading">
|
899
|
+
<a href="#M000295" class="method-signature">
|
900
|
+
<span class="method-name">raise_error</span><span class="method-args">( message=nil )</span>
|
901
|
+
</a>
|
902
|
+
</div>
|
903
|
+
|
904
|
+
<div class="method-description">
|
905
|
+
<p>
|
906
|
+
Force an <a href="Error.html">Error</a> status
|
907
|
+
</p>
|
908
|
+
<p><a class="source-toggle" href="#"
|
909
|
+
onclick="toggleCode('M000295-source');return false;">[Source]</a></p>
|
910
|
+
<div class="method-source-code" id="M000295-source">
|
911
|
+
<pre>
|
912
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 513</span>
|
913
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raise_error</span> ( <span class="ruby-identifier">message</span>=<span class="ruby-keyword kw">nil</span> )
|
914
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">:error</span>
|
915
|
+
<span class="ruby-identifier">raise_status</span> <span class="ruby-constant">ErrorStatus</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">message</span>)
|
916
|
+
<span class="ruby-keyword kw">end</span>
|
917
|
+
</pre>
|
918
|
+
</div>
|
919
|
+
</div>
|
920
|
+
</div>
|
921
|
+
|
922
|
+
<div id="method-M000255" class="method-detail">
|
923
|
+
<a name="M000255"></a>
|
924
|
+
|
925
|
+
<div class="method-heading">
|
926
|
+
<a href="#M000255" class="method-signature">
|
927
|
+
<span class="method-name">raise_error</span><span class="method-args">( message=nil )</span>
|
928
|
+
</a>
|
929
|
+
</div>
|
930
|
+
|
931
|
+
<div class="method-description">
|
932
|
+
<p>
|
933
|
+
Force an <a href="Error.html">Error</a> status
|
934
|
+
</p>
|
935
|
+
<p><a class="source-toggle" href="#"
|
936
|
+
onclick="toggleCode('M000255-source');return false;">[Source]</a></p>
|
937
|
+
<div class="method-source-code" id="M000255-source">
|
938
|
+
<pre>
|
939
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 513</span>
|
940
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raise_error</span> ( <span class="ruby-identifier">message</span>=<span class="ruby-keyword kw">nil</span> )
|
941
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">:error</span>
|
942
|
+
<span class="ruby-identifier">raise_status</span> <span class="ruby-constant">ErrorStatus</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">message</span>)
|
943
|
+
<span class="ruby-keyword kw">end</span>
|
944
|
+
</pre>
|
945
|
+
</div>
|
946
|
+
</div>
|
947
|
+
</div>
|
948
|
+
|
949
|
+
<div id="method-M000235" class="method-detail">
|
950
|
+
<a name="M000235"></a>
|
951
|
+
|
952
|
+
<div class="method-heading">
|
953
|
+
<a href="#M000235" class="method-signature">
|
954
|
+
<span class="method-name">reject</span><span class="method-args">( *att )</span>
|
955
|
+
</a>
|
956
|
+
</div>
|
957
|
+
|
958
|
+
<div class="method-description">
|
959
|
+
<p>
|
960
|
+
Reject
|
961
|
+
</p>
|
962
|
+
<p><a class="source-toggle" href="#"
|
963
|
+
onclick="toggleCode('M000235-source');return false;">[Source]</a></p>
|
964
|
+
<div class="method-source-code" id="M000235-source">
|
965
|
+
<pre>
|
966
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 266</span>
|
967
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reject</span> ( <span class="ruby-operator">*</span><span class="ruby-identifier">att</span> )
|
968
|
+
<span class="ruby-ivar">@reject</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">att</span>.<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_sym</span> }
|
969
|
+
<span class="ruby-keyword kw">end</span>
|
970
|
+
</pre>
|
971
|
+
</div>
|
972
|
+
</div>
|
973
|
+
</div>
|
974
|
+
|
975
|
+
<div id="method-M000275" class="method-detail">
|
976
|
+
<a name="M000275"></a>
|
977
|
+
|
978
|
+
<div class="method-heading">
|
979
|
+
<a href="#M000275" class="method-signature">
|
980
|
+
<span class="method-name">reject</span><span class="method-args">( *att )</span>
|
981
|
+
</a>
|
982
|
+
</div>
|
983
|
+
|
984
|
+
<div class="method-description">
|
985
|
+
<p>
|
986
|
+
Reject
|
987
|
+
</p>
|
988
|
+
<p><a class="source-toggle" href="#"
|
989
|
+
onclick="toggleCode('M000275-source');return false;">[Source]</a></p>
|
990
|
+
<div class="method-source-code" id="M000275-source">
|
991
|
+
<pre>
|
992
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 266</span>
|
993
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reject</span> ( <span class="ruby-operator">*</span><span class="ruby-identifier">att</span> )
|
994
|
+
<span class="ruby-ivar">@reject</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">att</span>.<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_sym</span> }
|
995
|
+
<span class="ruby-keyword kw">end</span>
|
996
|
+
</pre>
|
997
|
+
</div>
|
998
|
+
</div>
|
999
|
+
</div>
|
1000
|
+
|
1001
|
+
<div id="method-M000229" class="method-detail">
|
1002
|
+
<a name="M000229"></a>
|
1003
|
+
|
1004
|
+
<div class="method-heading">
|
1005
|
+
<a href="#M000229" class="method-signature">
|
1006
|
+
<span class="method-name">run</span><span class="method-args">( log=@symtbl[:log] )</span>
|
1007
|
+
</a>
|
1008
|
+
</div>
|
1009
|
+
|
1010
|
+
<div class="method-description">
|
1011
|
+
<p>
|
1012
|
+
Runs this test, proceding like this:
|
1013
|
+
</p>
|
1014
|
+
<pre>
|
1015
|
+
- pre_assertion
|
1016
|
+
- prologue
|
1017
|
+
- run_impl
|
1018
|
+
- assertion
|
1019
|
+
- post_assertion
|
1020
|
+
- epilogue
|
1021
|
+
</pre>
|
1022
|
+
<p><a class="source-toggle" href="#"
|
1023
|
+
onclick="toggleCode('M000229-source');return false;">[Source]</a></p>
|
1024
|
+
<div class="method-source-code" id="M000229-source">
|
1025
|
+
<pre>
|
1026
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 82</span>
|
1027
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span> ( <span class="ruby-identifier">log</span>=<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:log</span>] )
|
1028
|
+
<span class="ruby-ivar">@log</span> = <span class="ruby-identifier">log</span>
|
1029
|
+
<span class="ruby-identifier">initialize_flow_factory</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow_factory</span>].<span class="ruby-identifier">nil?</span>
|
1030
|
+
<span class="ruby-identifier">flow</span> = <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>]
|
1031
|
+
<span class="ruby-identifier">flow</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:prologue</span>
|
1032
|
+
|
1033
|
+
<span class="ruby-ivar">@status</span> = <span class="ruby-constant">RunningStatus</span>.<span class="ruby-identifier">new</span>
|
1034
|
+
<span class="ruby-ivar">@thread</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>
|
1035
|
+
|
1036
|
+
<span class="ruby-identifier">aborted</span> = <span class="ruby-keyword kw">nil</span>
|
1037
|
+
|
1038
|
+
<span class="ruby-identifier">saved_path_size</span> = <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">path_size</span>
|
1039
|
+
<span class="ruby-keyword kw">begin</span>
|
1040
|
+
<span class="ruby-keyword kw">begin</span>
|
1041
|
+
|
1042
|
+
<span class="ruby-comment cmt"># Pre assertion</span>
|
1043
|
+
<span class="ruby-identifier">pre_assertion_failed</span> = <span class="ruby-keyword kw">nil</span>
|
1044
|
+
<span class="ruby-keyword kw">begin</span>
|
1045
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span> = <span class="ruby-identifier">pre_assertion</span>()
|
1046
|
+
<span class="ruby-identifier">pre_assertion_failed</span> = <span class="ruby-node">"Pre assertion failed (#{r.inspect})"</span>
|
1047
|
+
<span class="ruby-keyword kw">end</span>
|
1048
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1049
|
+
<span class="ruby-identifier">pre_assertion_failed</span> = <span class="ruby-identifier">ex</span>
|
1050
|
+
<span class="ruby-keyword kw">end</span>
|
1051
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pre_assertion_failed</span>
|
1052
|
+
<span class="ruby-ivar">@log</span>.<span class="ruby-identifier">new_node</span>(<span class="ruby-identifier">to_s</span>)
|
1053
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">:error</span>
|
1054
|
+
<span class="ruby-identifier">skip</span>(<span class="ruby-identifier">pre_assertion_failed</span>)
|
1055
|
+
<span class="ruby-keyword kw">end</span>
|
1056
|
+
|
1057
|
+
<span class="ruby-keyword kw">begin</span>
|
1058
|
+
<span class="ruby-identifier">prologue</span>()
|
1059
|
+
<span class="ruby-comment cmt"># @log.flow_id = flow.i</span>
|
1060
|
+
|
1061
|
+
<span class="ruby-comment cmt"># Catch all other exceptions and wrapped them in an error.</span>
|
1062
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1063
|
+
<span class="ruby-identifier">raise_error</span>(<span class="ruby-identifier">ex</span>)
|
1064
|
+
<span class="ruby-keyword kw">end</span>
|
1065
|
+
|
1066
|
+
<span class="ruby-identifier">msg</span> = <span class="ruby-node">"abort `%name' with timeout #{@timeout}s"</span>
|
1067
|
+
<span class="ruby-identifier">specific_abort</span> = <span class="ruby-constant">TimeoutAbortStatus</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">flow</span>, <span class="ruby-identifier">msg</span>)
|
1068
|
+
|
1069
|
+
<span class="ruby-keyword kw">begin</span>
|
1070
|
+
<span class="ruby-identifier">flow</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:begin_run_impl</span>
|
1071
|
+
<span class="ruby-identifier">skip_if_cached</span>
|
1072
|
+
<span class="ruby-constant">Timeout</span>.<span class="ruby-identifier">timeout</span>(<span class="ruby-ivar">@timeout</span>, <span class="ruby-identifier">specific_abort</span>) <span class="ruby-keyword kw">do</span>
|
1073
|
+
<span class="ruby-identifier">run_impl</span>()
|
1074
|
+
<span class="ruby-keyword kw">end</span>
|
1075
|
+
<span class="ruby-keyword kw">ensure</span>
|
1076
|
+
<span class="ruby-identifier">flow</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:end_run_impl</span>
|
1077
|
+
<span class="ruby-keyword kw">end</span>
|
1078
|
+
|
1079
|
+
<span class="ruby-comment cmt"># Post assertion</span>
|
1080
|
+
<span class="ruby-identifier">post_assertion_failed</span> = <span class="ruby-keyword kw">nil</span>
|
1081
|
+
<span class="ruby-keyword kw">begin</span>
|
1082
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span> = <span class="ruby-identifier">post_assertion</span>()
|
1083
|
+
<span class="ruby-identifier">post_assertion_failed</span> = <span class="ruby-node">"Post assertion failed (#{r.inspect})"</span>
|
1084
|
+
<span class="ruby-keyword kw">end</span>
|
1085
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1086
|
+
<span class="ruby-identifier">post_assertion_failed</span> = <span class="ruby-identifier">ex</span>
|
1087
|
+
<span class="ruby-keyword kw">end</span>
|
1088
|
+
<span class="ruby-identifier">fail</span>(<span class="ruby-identifier">post_assertion_failed</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">post_assertion_failed</span>
|
1089
|
+
|
1090
|
+
|
1091
|
+
<span class="ruby-comment cmt"># Assertion</span>
|
1092
|
+
<span class="ruby-identifier">assertion</span>()
|
1093
|
+
|
1094
|
+
|
1095
|
+
<span class="ruby-identifier">raise_error</span>(<span class="ruby-value str">'no status given'</span>)
|
1096
|
+
|
1097
|
+
<span class="ruby-comment cmt"># Forward StatusException</span>
|
1098
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StatusException</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1099
|
+
<span class="ruby-identifier">st</span> = <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">status</span>
|
1100
|
+
<span class="ruby-comment cmt"># Put the exception in `aborted' if it dosen't concern me and abort.</span>
|
1101
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">st</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">TimeoutAbortStatus</span>
|
1102
|
+
<span class="ruby-identifier">aborted</span> = <span class="ruby-identifier">ex</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">st</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">specific_abort</span>
|
1103
|
+
<span class="ruby-identifier">st</span>.<span class="ruby-identifier">message</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-value str">'%name'</span>, <span class="ruby-ivar">@name</span>.<span class="ruby-identifier">to_s</span>)
|
1104
|
+
<span class="ruby-keyword kw">end</span>
|
1105
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">ex</span>
|
1106
|
+
|
1107
|
+
<span class="ruby-comment cmt"># Convert the Failure exception with `fail' (Warn: almost deprecated).</span>
|
1108
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Failure</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1109
|
+
<span class="ruby-identifier">fail</span>(<span class="ruby-identifier">ex</span>)
|
1110
|
+
|
1111
|
+
<span class="ruby-comment cmt"># Catch all others exceptions and wrapped them in an error.</span>
|
1112
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1113
|
+
<span class="ruby-identifier">raise_error</span>(<span class="ruby-identifier">ex</span>)
|
1114
|
+
<span class="ruby-keyword kw">end</span>
|
1115
|
+
|
1116
|
+
<span class="ruby-comment cmt"># Threat Status exceptions</span>
|
1117
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StatusException</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1118
|
+
<span class="ruby-keyword kw">begin</span>
|
1119
|
+
|
1120
|
+
<span class="ruby-identifier">flow</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:epilogue</span>
|
1121
|
+
<span class="ruby-ivar">@status</span> = <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">status</span>
|
1122
|
+
<span class="ruby-comment cmt"># Call the specific hook (pass_hook, failed_hook...).</span>
|
1123
|
+
<span class="ruby-identifier">send</span>(<span class="ruby-identifier">ex</span>.<span class="ruby-identifier">status</span>.<span class="ruby-identifier">hook_name</span>)
|
1124
|
+
<span class="ruby-identifier">epilogue</span>() <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">pre_assertion_failed</span>
|
1125
|
+
|
1126
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SynFlow</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1127
|
+
<span class="ruby-identifier">display_unexpected_synflow_exc</span> <span class="ruby-identifier">ex</span>, <span class="ruby-identifier">:epilogue</span>
|
1128
|
+
|
1129
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1130
|
+
<span class="ruby-identifier">display_unexpected_exc</span> <span class="ruby-identifier">ex</span>
|
1131
|
+
<span class="ruby-keyword kw">end</span>
|
1132
|
+
|
1133
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1134
|
+
<span class="ruby-identifier">display_unexpected_exc</span> <span class="ruby-identifier">ex</span>
|
1135
|
+
<span class="ruby-keyword kw">end</span>
|
1136
|
+
|
1137
|
+
<span class="ruby-keyword kw">begin</span>
|
1138
|
+
<span class="ruby-ivar">@status</span>.<span class="ruby-identifier">to_ttk_log</span>(<span class="ruby-ivar">@log</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@reject</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:status</span>)
|
1139
|
+
<span class="ruby-ivar">@status</span>.<span class="ruby-identifier">weight</span> <span class="ruby-operator">*=</span> <span class="ruby-ivar">@weight</span>
|
1140
|
+
(<span class="ruby-ivar">@log</span>.<span class="ruby-identifier">path_size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">saved_path_size</span>).<span class="ruby-identifier">times</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">up</span> }
|
1141
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cache</span> = <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:cache</span>]
|
1142
|
+
<span class="ruby-identifier">cache</span>[<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:pathname</span>]] =
|
1143
|
+
{
|
1144
|
+
<span class="ruby-identifier">:status</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@status</span>,
|
1145
|
+
<span class="ruby-identifier">:symtbl</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@symtbl</span>.<span class="ruby-identifier">local</span>
|
1146
|
+
}
|
1147
|
+
<span class="ruby-keyword kw">end</span>
|
1148
|
+
<span class="ruby-ivar">@reject</span>.<span class="ruby-identifier">clear</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-ivar">@reject</span>
|
1149
|
+
<span class="ruby-identifier">clean_instance_variables</span>
|
1150
|
+
<span class="ruby-identifier">flow</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:finish</span>
|
1151
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SynFlow</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1152
|
+
<span class="ruby-identifier">display_unexpected_synflow_exc</span> <span class="ruby-identifier">ex</span>, <span class="ruby-identifier">:finish</span>
|
1153
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1154
|
+
<span class="ruby-identifier">display_unexpected_exc</span> <span class="ruby-identifier">ex</span>
|
1155
|
+
<span class="ruby-keyword kw">end</span>
|
1156
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">aborted</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">aborted</span>.<span class="ruby-identifier">nil?</span>
|
1157
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@status</span>
|
1158
|
+
|
1159
|
+
<span class="ruby-keyword kw">end</span>
|
1160
|
+
</pre>
|
1161
|
+
</div>
|
1162
|
+
</div>
|
1163
|
+
</div>
|
1164
|
+
|
1165
|
+
<div id="method-M000269" class="method-detail">
|
1166
|
+
<a name="M000269"></a>
|
1167
|
+
|
1168
|
+
<div class="method-heading">
|
1169
|
+
<a href="#M000269" class="method-signature">
|
1170
|
+
<span class="method-name">run</span><span class="method-args">( log=@symtbl[:log] )</span>
|
1171
|
+
</a>
|
1172
|
+
</div>
|
1173
|
+
|
1174
|
+
<div class="method-description">
|
1175
|
+
<p>
|
1176
|
+
Runs this test, proceding like this:
|
1177
|
+
</p>
|
1178
|
+
<pre>
|
1179
|
+
- pre_assertion
|
1180
|
+
- prologue
|
1181
|
+
- run_impl
|
1182
|
+
- assertion
|
1183
|
+
- post_assertion
|
1184
|
+
- epilogue
|
1185
|
+
</pre>
|
1186
|
+
<p><a class="source-toggle" href="#"
|
1187
|
+
onclick="toggleCode('M000269-source');return false;">[Source]</a></p>
|
1188
|
+
<div class="method-source-code" id="M000269-source">
|
1189
|
+
<pre>
|
1190
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 82</span>
|
1191
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span> ( <span class="ruby-identifier">log</span>=<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:log</span>] )
|
1192
|
+
<span class="ruby-ivar">@log</span> = <span class="ruby-identifier">log</span>
|
1193
|
+
<span class="ruby-identifier">initialize_flow_factory</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow_factory</span>].<span class="ruby-identifier">nil?</span>
|
1194
|
+
<span class="ruby-identifier">flow</span> = <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>]
|
1195
|
+
<span class="ruby-identifier">flow</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:prologue</span>
|
1196
|
+
|
1197
|
+
<span class="ruby-ivar">@status</span> = <span class="ruby-constant">RunningStatus</span>.<span class="ruby-identifier">new</span>
|
1198
|
+
<span class="ruby-ivar">@thread</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>
|
1199
|
+
|
1200
|
+
<span class="ruby-identifier">aborted</span> = <span class="ruby-keyword kw">nil</span>
|
1201
|
+
|
1202
|
+
<span class="ruby-identifier">saved_path_size</span> = <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">path_size</span>
|
1203
|
+
<span class="ruby-keyword kw">begin</span>
|
1204
|
+
<span class="ruby-keyword kw">begin</span>
|
1205
|
+
|
1206
|
+
<span class="ruby-comment cmt"># Pre assertion</span>
|
1207
|
+
<span class="ruby-identifier">pre_assertion_failed</span> = <span class="ruby-keyword kw">nil</span>
|
1208
|
+
<span class="ruby-keyword kw">begin</span>
|
1209
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span> = <span class="ruby-identifier">pre_assertion</span>()
|
1210
|
+
<span class="ruby-identifier">pre_assertion_failed</span> = <span class="ruby-node">"Pre assertion failed (#{r.inspect})"</span>
|
1211
|
+
<span class="ruby-keyword kw">end</span>
|
1212
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1213
|
+
<span class="ruby-identifier">pre_assertion_failed</span> = <span class="ruby-identifier">ex</span>
|
1214
|
+
<span class="ruby-keyword kw">end</span>
|
1215
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pre_assertion_failed</span>
|
1216
|
+
<span class="ruby-ivar">@log</span>.<span class="ruby-identifier">new_node</span>(<span class="ruby-identifier">to_s</span>)
|
1217
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:flow</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">:error</span>
|
1218
|
+
<span class="ruby-identifier">skip</span>(<span class="ruby-identifier">pre_assertion_failed</span>)
|
1219
|
+
<span class="ruby-keyword kw">end</span>
|
1220
|
+
|
1221
|
+
<span class="ruby-keyword kw">begin</span>
|
1222
|
+
<span class="ruby-identifier">prologue</span>()
|
1223
|
+
<span class="ruby-comment cmt"># @log.flow_id = flow.i</span>
|
1224
|
+
|
1225
|
+
<span class="ruby-comment cmt"># Catch all other exceptions and wrapped them in an error.</span>
|
1226
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1227
|
+
<span class="ruby-identifier">raise_error</span>(<span class="ruby-identifier">ex</span>)
|
1228
|
+
<span class="ruby-keyword kw">end</span>
|
1229
|
+
|
1230
|
+
<span class="ruby-identifier">msg</span> = <span class="ruby-node">"abort `%name' with timeout #{@timeout}s"</span>
|
1231
|
+
<span class="ruby-identifier">specific_abort</span> = <span class="ruby-constant">TimeoutAbortStatus</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">flow</span>, <span class="ruby-identifier">msg</span>)
|
1232
|
+
|
1233
|
+
<span class="ruby-keyword kw">begin</span>
|
1234
|
+
<span class="ruby-identifier">flow</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:begin_run_impl</span>
|
1235
|
+
<span class="ruby-identifier">skip_if_cached</span>
|
1236
|
+
<span class="ruby-constant">Timeout</span>.<span class="ruby-identifier">timeout</span>(<span class="ruby-ivar">@timeout</span>, <span class="ruby-identifier">specific_abort</span>) <span class="ruby-keyword kw">do</span>
|
1237
|
+
<span class="ruby-identifier">run_impl</span>()
|
1238
|
+
<span class="ruby-keyword kw">end</span>
|
1239
|
+
<span class="ruby-keyword kw">ensure</span>
|
1240
|
+
<span class="ruby-identifier">flow</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:end_run_impl</span>
|
1241
|
+
<span class="ruby-keyword kw">end</span>
|
1242
|
+
|
1243
|
+
<span class="ruby-comment cmt"># Post assertion</span>
|
1244
|
+
<span class="ruby-identifier">post_assertion_failed</span> = <span class="ruby-keyword kw">nil</span>
|
1245
|
+
<span class="ruby-keyword kw">begin</span>
|
1246
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span> = <span class="ruby-identifier">post_assertion</span>()
|
1247
|
+
<span class="ruby-identifier">post_assertion_failed</span> = <span class="ruby-node">"Post assertion failed (#{r.inspect})"</span>
|
1248
|
+
<span class="ruby-keyword kw">end</span>
|
1249
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1250
|
+
<span class="ruby-identifier">post_assertion_failed</span> = <span class="ruby-identifier">ex</span>
|
1251
|
+
<span class="ruby-keyword kw">end</span>
|
1252
|
+
<span class="ruby-identifier">fail</span>(<span class="ruby-identifier">post_assertion_failed</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">post_assertion_failed</span>
|
1253
|
+
|
1254
|
+
|
1255
|
+
<span class="ruby-comment cmt"># Assertion</span>
|
1256
|
+
<span class="ruby-identifier">assertion</span>()
|
1257
|
+
|
1258
|
+
|
1259
|
+
<span class="ruby-identifier">raise_error</span>(<span class="ruby-value str">'no status given'</span>)
|
1260
|
+
|
1261
|
+
<span class="ruby-comment cmt"># Forward StatusException</span>
|
1262
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StatusException</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1263
|
+
<span class="ruby-identifier">st</span> = <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">status</span>
|
1264
|
+
<span class="ruby-comment cmt"># Put the exception in `aborted' if it dosen't concern me and abort.</span>
|
1265
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">st</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">TimeoutAbortStatus</span>
|
1266
|
+
<span class="ruby-identifier">aborted</span> = <span class="ruby-identifier">ex</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">st</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">specific_abort</span>
|
1267
|
+
<span class="ruby-identifier">st</span>.<span class="ruby-identifier">message</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-value str">'%name'</span>, <span class="ruby-ivar">@name</span>.<span class="ruby-identifier">to_s</span>)
|
1268
|
+
<span class="ruby-keyword kw">end</span>
|
1269
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">ex</span>
|
1270
|
+
|
1271
|
+
<span class="ruby-comment cmt"># Convert the Failure exception with `fail' (Warn: almost deprecated).</span>
|
1272
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Failure</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1273
|
+
<span class="ruby-identifier">fail</span>(<span class="ruby-identifier">ex</span>)
|
1274
|
+
|
1275
|
+
<span class="ruby-comment cmt"># Catch all others exceptions and wrapped them in an error.</span>
|
1276
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1277
|
+
<span class="ruby-identifier">raise_error</span>(<span class="ruby-identifier">ex</span>)
|
1278
|
+
<span class="ruby-keyword kw">end</span>
|
1279
|
+
|
1280
|
+
<span class="ruby-comment cmt"># Threat Status exceptions</span>
|
1281
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StatusException</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1282
|
+
<span class="ruby-keyword kw">begin</span>
|
1283
|
+
|
1284
|
+
<span class="ruby-identifier">flow</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:epilogue</span>
|
1285
|
+
<span class="ruby-ivar">@status</span> = <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">status</span>
|
1286
|
+
<span class="ruby-comment cmt"># Call the specific hook (pass_hook, failed_hook...).</span>
|
1287
|
+
<span class="ruby-identifier">send</span>(<span class="ruby-identifier">ex</span>.<span class="ruby-identifier">status</span>.<span class="ruby-identifier">hook_name</span>)
|
1288
|
+
<span class="ruby-identifier">epilogue</span>() <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">pre_assertion_failed</span>
|
1289
|
+
|
1290
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SynFlow</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1291
|
+
<span class="ruby-identifier">display_unexpected_synflow_exc</span> <span class="ruby-identifier">ex</span>, <span class="ruby-identifier">:epilogue</span>
|
1292
|
+
|
1293
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1294
|
+
<span class="ruby-identifier">display_unexpected_exc</span> <span class="ruby-identifier">ex</span>
|
1295
|
+
<span class="ruby-keyword kw">end</span>
|
1296
|
+
|
1297
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1298
|
+
<span class="ruby-identifier">display_unexpected_exc</span> <span class="ruby-identifier">ex</span>
|
1299
|
+
<span class="ruby-keyword kw">end</span>
|
1300
|
+
|
1301
|
+
<span class="ruby-keyword kw">begin</span>
|
1302
|
+
<span class="ruby-ivar">@status</span>.<span class="ruby-identifier">to_ttk_log</span>(<span class="ruby-ivar">@log</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@reject</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:status</span>)
|
1303
|
+
<span class="ruby-ivar">@status</span>.<span class="ruby-identifier">weight</span> <span class="ruby-operator">*=</span> <span class="ruby-ivar">@weight</span>
|
1304
|
+
(<span class="ruby-ivar">@log</span>.<span class="ruby-identifier">path_size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">saved_path_size</span>).<span class="ruby-identifier">times</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">up</span> }
|
1305
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cache</span> = <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:cache</span>]
|
1306
|
+
<span class="ruby-identifier">cache</span>[<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:pathname</span>]] =
|
1307
|
+
{
|
1308
|
+
<span class="ruby-identifier">:status</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@status</span>,
|
1309
|
+
<span class="ruby-identifier">:symtbl</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@symtbl</span>.<span class="ruby-identifier">local</span>
|
1310
|
+
}
|
1311
|
+
<span class="ruby-keyword kw">end</span>
|
1312
|
+
<span class="ruby-ivar">@reject</span>.<span class="ruby-identifier">clear</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-ivar">@reject</span>
|
1313
|
+
<span class="ruby-identifier">clean_instance_variables</span>
|
1314
|
+
<span class="ruby-identifier">flow</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:finish</span>
|
1315
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SynFlow</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1316
|
+
<span class="ruby-identifier">display_unexpected_synflow_exc</span> <span class="ruby-identifier">ex</span>, <span class="ruby-identifier">:finish</span>
|
1317
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
1318
|
+
<span class="ruby-identifier">display_unexpected_exc</span> <span class="ruby-identifier">ex</span>
|
1319
|
+
<span class="ruby-keyword kw">end</span>
|
1320
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">aborted</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">aborted</span>.<span class="ruby-identifier">nil?</span>
|
1321
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@status</span>
|
1322
|
+
|
1323
|
+
<span class="ruby-keyword kw">end</span>
|
1324
|
+
</pre>
|
1325
|
+
</div>
|
1326
|
+
</div>
|
1327
|
+
</div>
|
1328
|
+
|
1329
|
+
<div id="method-M000261" class="method-detail">
|
1330
|
+
<a name="M000261"></a>
|
1331
|
+
|
1332
|
+
<div class="method-heading">
|
1333
|
+
<a href="#M000261" class="method-signature">
|
1334
|
+
<span class="method-name">running?</span><span class="method-args">()</span>
|
1335
|
+
</a>
|
1336
|
+
</div>
|
1337
|
+
|
1338
|
+
<div class="method-description">
|
1339
|
+
<p><a class="source-toggle" href="#"
|
1340
|
+
onclick="toggleCode('M000261-source');return false;">[Source]</a></p>
|
1341
|
+
<div class="method-source-code" id="M000261-source">
|
1342
|
+
<pre>
|
1343
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 550</span>
|
1344
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">running?</span>
|
1345
|
+
<span class="ruby-keyword kw">defined?</span> <span class="ruby-ivar">@status</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@status</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RunningStatus</span>
|
1346
|
+
<span class="ruby-keyword kw">end</span>
|
1347
|
+
</pre>
|
1348
|
+
</div>
|
1349
|
+
</div>
|
1350
|
+
</div>
|
1351
|
+
|
1352
|
+
<div id="method-M000301" class="method-detail">
|
1353
|
+
<a name="M000301"></a>
|
1354
|
+
|
1355
|
+
<div class="method-heading">
|
1356
|
+
<a href="#M000301" class="method-signature">
|
1357
|
+
<span class="method-name">running?</span><span class="method-args">()</span>
|
1358
|
+
</a>
|
1359
|
+
</div>
|
1360
|
+
|
1361
|
+
<div class="method-description">
|
1362
|
+
<p><a class="source-toggle" href="#"
|
1363
|
+
onclick="toggleCode('M000301-source');return false;">[Source]</a></p>
|
1364
|
+
<div class="method-source-code" id="M000301-source">
|
1365
|
+
<pre>
|
1366
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 550</span>
|
1367
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">running?</span>
|
1368
|
+
<span class="ruby-keyword kw">defined?</span> <span class="ruby-ivar">@status</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@status</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RunningStatus</span>
|
1369
|
+
<span class="ruby-keyword kw">end</span>
|
1370
|
+
</pre>
|
1371
|
+
</div>
|
1372
|
+
</div>
|
1373
|
+
</div>
|
1374
|
+
|
1375
|
+
<div id="method-M000254" class="method-detail">
|
1376
|
+
<a name="M000254"></a>
|
1377
|
+
|
1378
|
+
<div class="method-heading">
|
1379
|
+
<a href="#M000254" class="method-signature">
|
1380
|
+
<span class="method-name">skip</span><span class="method-args">( *args )</span>
|
1381
|
+
</a>
|
1382
|
+
</div>
|
1383
|
+
|
1384
|
+
<div class="method-description">
|
1385
|
+
<p>
|
1386
|
+
Skip the test
|
1387
|
+
</p>
|
1388
|
+
<p><a class="source-toggle" href="#"
|
1389
|
+
onclick="toggleCode('M000254-source');return false;">[Source]</a></p>
|
1390
|
+
<div class="method-source-code" id="M000254-source">
|
1391
|
+
<pre>
|
1392
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 508</span>
|
1393
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skip</span> ( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
1394
|
+
<span class="ruby-identifier">raise_status_custom</span> <span class="ruby-constant">SkipStatus</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
|
1395
|
+
<span class="ruby-keyword kw">end</span>
|
1396
|
+
</pre>
|
1397
|
+
</div>
|
1398
|
+
</div>
|
1399
|
+
</div>
|
1400
|
+
|
1401
|
+
<div id="method-M000294" class="method-detail">
|
1402
|
+
<a name="M000294"></a>
|
1403
|
+
|
1404
|
+
<div class="method-heading">
|
1405
|
+
<a href="#M000294" class="method-signature">
|
1406
|
+
<span class="method-name">skip</span><span class="method-args">( *args )</span>
|
1407
|
+
</a>
|
1408
|
+
</div>
|
1409
|
+
|
1410
|
+
<div class="method-description">
|
1411
|
+
<p>
|
1412
|
+
Skip the test
|
1413
|
+
</p>
|
1414
|
+
<p><a class="source-toggle" href="#"
|
1415
|
+
onclick="toggleCode('M000294-source');return false;">[Source]</a></p>
|
1416
|
+
<div class="method-source-code" id="M000294-source">
|
1417
|
+
<pre>
|
1418
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 508</span>
|
1419
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skip</span> ( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
1420
|
+
<span class="ruby-identifier">raise_status_custom</span> <span class="ruby-constant">SkipStatus</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
|
1421
|
+
<span class="ruby-keyword kw">end</span>
|
1422
|
+
</pre>
|
1423
|
+
</div>
|
1424
|
+
</div>
|
1425
|
+
</div>
|
1426
|
+
|
1427
|
+
<div id="method-M000277" class="method-detail">
|
1428
|
+
<a name="M000277"></a>
|
1429
|
+
|
1430
|
+
<div class="method-heading">
|
1431
|
+
<a href="#M000277" class="method-signature">
|
1432
|
+
<span class="method-name">skip_if_cached</span><span class="method-args">()</span>
|
1433
|
+
</a>
|
1434
|
+
</div>
|
1435
|
+
|
1436
|
+
<div class="method-description">
|
1437
|
+
<p><a class="source-toggle" href="#"
|
1438
|
+
onclick="toggleCode('M000277-source');return false;">[Source]</a></p>
|
1439
|
+
<div class="method-source-code" id="M000277-source">
|
1440
|
+
<pre>
|
1441
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 337</span>
|
1442
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skip_if_cached</span>
|
1443
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cache</span> = <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:use_cache</span>]
|
1444
|
+
<span class="ruby-identifier">me</span> = <span class="ruby-identifier">cache</span>[<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:pathname</span>]]
|
1445
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">me</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:cache_proc</span>][<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">me</span>[<span class="ruby-identifier">:status</span>]]
|
1446
|
+
<span class="ruby-ivar">@symtbl</span>.<span class="ruby-identifier">local</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">me</span>[<span class="ruby-identifier">:symtbl</span>])
|
1447
|
+
<span class="ruby-identifier">skip</span>(<span class="ruby-ivar">@wclass</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">me</span>[<span class="ruby-identifier">:status</span>].<span class="ruby-identifier">weight</span>))
|
1448
|
+
<span class="ruby-keyword kw">end</span>
|
1449
|
+
<span class="ruby-keyword kw">end</span>
|
1450
|
+
<span class="ruby-keyword kw">end</span>
|
1451
|
+
</pre>
|
1452
|
+
</div>
|
1453
|
+
</div>
|
1454
|
+
</div>
|
1455
|
+
|
1456
|
+
<div id="method-M000237" class="method-detail">
|
1457
|
+
<a name="M000237"></a>
|
1458
|
+
|
1459
|
+
<div class="method-heading">
|
1460
|
+
<a href="#M000237" class="method-signature">
|
1461
|
+
<span class="method-name">skip_if_cached</span><span class="method-args">()</span>
|
1462
|
+
</a>
|
1463
|
+
</div>
|
1464
|
+
|
1465
|
+
<div class="method-description">
|
1466
|
+
<p><a class="source-toggle" href="#"
|
1467
|
+
onclick="toggleCode('M000237-source');return false;">[Source]</a></p>
|
1468
|
+
<div class="method-source-code" id="M000237-source">
|
1469
|
+
<pre>
|
1470
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 337</span>
|
1471
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skip_if_cached</span>
|
1472
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cache</span> = <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:use_cache</span>]
|
1473
|
+
<span class="ruby-identifier">me</span> = <span class="ruby-identifier">cache</span>[<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:pathname</span>]]
|
1474
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">me</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:cache_proc</span>][<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">me</span>[<span class="ruby-identifier">:status</span>]]
|
1475
|
+
<span class="ruby-ivar">@symtbl</span>.<span class="ruby-identifier">local</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">me</span>[<span class="ruby-identifier">:symtbl</span>])
|
1476
|
+
<span class="ruby-identifier">skip</span>(<span class="ruby-ivar">@wclass</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">me</span>[<span class="ruby-identifier">:status</span>].<span class="ruby-identifier">weight</span>))
|
1477
|
+
<span class="ruby-keyword kw">end</span>
|
1478
|
+
<span class="ruby-keyword kw">end</span>
|
1479
|
+
<span class="ruby-keyword kw">end</span>
|
1480
|
+
</pre>
|
1481
|
+
</div>
|
1482
|
+
</div>
|
1483
|
+
</div>
|
1484
|
+
|
1485
|
+
<div id="method-M000305" class="method-detail">
|
1486
|
+
<a name="M000305"></a>
|
1487
|
+
|
1488
|
+
<div class="method-heading">
|
1489
|
+
<a href="#M000305" class="method-signature">
|
1490
|
+
<span class="method-name">strategy</span><span class="method-args">()</span>
|
1491
|
+
</a>
|
1492
|
+
</div>
|
1493
|
+
|
1494
|
+
<div class="method-description">
|
1495
|
+
<p><a class="source-toggle" href="#"
|
1496
|
+
onclick="toggleCode('M000305-source');return false;">[Source]</a></p>
|
1497
|
+
<div class="method-source-code" id="M000305-source">
|
1498
|
+
<pre>
|
1499
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 570</span>
|
1500
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strategy</span>
|
1501
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>
|
1502
|
+
<span class="ruby-keyword kw">end</span>
|
1503
|
+
</pre>
|
1504
|
+
</div>
|
1505
|
+
</div>
|
1506
|
+
</div>
|
1507
|
+
|
1508
|
+
<div id="method-M000265" class="method-detail">
|
1509
|
+
<a name="M000265"></a>
|
1510
|
+
|
1511
|
+
<div class="method-heading">
|
1512
|
+
<a href="#M000265" class="method-signature">
|
1513
|
+
<span class="method-name">strategy</span><span class="method-args">()</span>
|
1514
|
+
</a>
|
1515
|
+
</div>
|
1516
|
+
|
1517
|
+
<div class="method-description">
|
1518
|
+
<p><a class="source-toggle" href="#"
|
1519
|
+
onclick="toggleCode('M000265-source');return false;">[Source]</a></p>
|
1520
|
+
<div class="method-source-code" id="M000265-source">
|
1521
|
+
<pre>
|
1522
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 570</span>
|
1523
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strategy</span>
|
1524
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>
|
1525
|
+
<span class="ruby-keyword kw">end</span>
|
1526
|
+
</pre>
|
1527
|
+
</div>
|
1528
|
+
</div>
|
1529
|
+
</div>
|
1530
|
+
|
1531
|
+
<div id="method-M000306" class="method-detail">
|
1532
|
+
<a name="M000306"></a>
|
1533
|
+
|
1534
|
+
<div class="method-heading">
|
1535
|
+
<a href="#M000306" class="method-signature">
|
1536
|
+
<span class="method-name">strategy=</span><span class="method-args">( aClass )</span>
|
1537
|
+
</a>
|
1538
|
+
</div>
|
1539
|
+
|
1540
|
+
<div class="method-description">
|
1541
|
+
<p><a class="source-toggle" href="#"
|
1542
|
+
onclick="toggleCode('M000306-source');return false;">[Source]</a></p>
|
1543
|
+
<div class="method-source-code" id="M000306-source">
|
1544
|
+
<pre>
|
1545
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 574</span>
|
1546
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strategy=</span> ( <span class="ruby-identifier">aClass</span> )
|
1547
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aClass</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Strategy</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">aClass</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>
|
1548
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Cannot change the strategy class "</span> <span class="ruby-operator">+</span>
|
1549
|
+
<span class="ruby-node">"of a test (#{aClass} != #{self.class})"</span>
|
1550
|
+
<span class="ruby-keyword kw">end</span>
|
1551
|
+
<span class="ruby-keyword kw">end</span>
|
1552
|
+
</pre>
|
1553
|
+
</div>
|
1554
|
+
</div>
|
1555
|
+
</div>
|
1556
|
+
|
1557
|
+
<div id="method-M000266" class="method-detail">
|
1558
|
+
<a name="M000266"></a>
|
1559
|
+
|
1560
|
+
<div class="method-heading">
|
1561
|
+
<a href="#M000266" class="method-signature">
|
1562
|
+
<span class="method-name">strategy=</span><span class="method-args">( aClass )</span>
|
1563
|
+
</a>
|
1564
|
+
</div>
|
1565
|
+
|
1566
|
+
<div class="method-description">
|
1567
|
+
<p><a class="source-toggle" href="#"
|
1568
|
+
onclick="toggleCode('M000266-source');return false;">[Source]</a></p>
|
1569
|
+
<div class="method-source-code" id="M000266-source">
|
1570
|
+
<pre>
|
1571
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 574</span>
|
1572
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strategy=</span> ( <span class="ruby-identifier">aClass</span> )
|
1573
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aClass</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Strategy</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">aClass</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>
|
1574
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Cannot change the strategy class "</span> <span class="ruby-operator">+</span>
|
1575
|
+
<span class="ruby-node">"of a test (#{aClass} != #{self.class})"</span>
|
1576
|
+
<span class="ruby-keyword kw">end</span>
|
1577
|
+
<span class="ruby-keyword kw">end</span>
|
1578
|
+
</pre>
|
1579
|
+
</div>
|
1580
|
+
</div>
|
1581
|
+
</div>
|
1582
|
+
|
1583
|
+
<div id="method-M000264" class="method-detail">
|
1584
|
+
<a name="M000264"></a>
|
1585
|
+
|
1586
|
+
<div class="method-heading">
|
1587
|
+
<a href="#M000264" class="method-signature">
|
1588
|
+
<span class="method-name">symbols=</span><span class="method-args">( symbols )</span>
|
1589
|
+
</a>
|
1590
|
+
</div>
|
1591
|
+
|
1592
|
+
<div class="method-description">
|
1593
|
+
<p>
|
1594
|
+
FIXME: I’m not well dumped
|
1595
|
+
</p>
|
1596
|
+
<p><a class="source-toggle" href="#"
|
1597
|
+
onclick="toggleCode('M000264-source');return false;">[Source]</a></p>
|
1598
|
+
<div class="method-source-code" id="M000264-source">
|
1599
|
+
<pre>
|
1600
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 564</span>
|
1601
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbols=</span> ( <span class="ruby-identifier">symbols</span> )
|
1602
|
+
<span class="ruby-identifier">symbols</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
1603
|
+
<span class="ruby-ivar">@symbols</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>
|
1604
|
+
<span class="ruby-keyword kw">end</span>
|
1605
|
+
<span class="ruby-keyword kw">end</span>
|
1606
|
+
</pre>
|
1607
|
+
</div>
|
1608
|
+
</div>
|
1609
|
+
</div>
|
1610
|
+
|
1611
|
+
<div id="method-M000304" class="method-detail">
|
1612
|
+
<a name="M000304"></a>
|
1613
|
+
|
1614
|
+
<div class="method-heading">
|
1615
|
+
<a href="#M000304" class="method-signature">
|
1616
|
+
<span class="method-name">symbols=</span><span class="method-args">( symbols )</span>
|
1617
|
+
</a>
|
1618
|
+
</div>
|
1619
|
+
|
1620
|
+
<div class="method-description">
|
1621
|
+
<p>
|
1622
|
+
FIXME: I’m not well dumped
|
1623
|
+
</p>
|
1624
|
+
<p><a class="source-toggle" href="#"
|
1625
|
+
onclick="toggleCode('M000304-source');return false;">[Source]</a></p>
|
1626
|
+
<div class="method-source-code" id="M000304-source">
|
1627
|
+
<pre>
|
1628
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 564</span>
|
1629
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbols=</span> ( <span class="ruby-identifier">symbols</span> )
|
1630
|
+
<span class="ruby-identifier">symbols</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
1631
|
+
<span class="ruby-ivar">@symbols</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>
|
1632
|
+
<span class="ruby-keyword kw">end</span>
|
1633
|
+
<span class="ruby-keyword kw">end</span>
|
1634
|
+
</pre>
|
1635
|
+
</div>
|
1636
|
+
</div>
|
1637
|
+
</div>
|
1638
|
+
|
1639
|
+
<div id="method-M000267" class="method-detail">
|
1640
|
+
<a name="M000267"></a>
|
1641
|
+
|
1642
|
+
<div class="method-heading">
|
1643
|
+
<a href="#M000267" class="method-signature">
|
1644
|
+
<span class="method-name">symtbl=</span><span class="method-args">( aSymtbl )</span>
|
1645
|
+
</a>
|
1646
|
+
</div>
|
1647
|
+
|
1648
|
+
<div class="method-description">
|
1649
|
+
<p><a class="source-toggle" href="#"
|
1650
|
+
onclick="toggleCode('M000267-source');return false;">[Source]</a></p>
|
1651
|
+
<div class="method-source-code" id="M000267-source">
|
1652
|
+
<pre>
|
1653
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 581</span>
|
1654
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symtbl=</span> ( <span class="ruby-identifier">aSymtbl</span> )
|
1655
|
+
<span class="ruby-ivar">@symtbl</span> = <span class="ruby-identifier">aSymtbl</span>
|
1656
|
+
<span class="ruby-ivar">@log</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:log</span>]
|
1657
|
+
<span class="ruby-keyword kw">end</span>
|
1658
|
+
</pre>
|
1659
|
+
</div>
|
1660
|
+
</div>
|
1661
|
+
</div>
|
1662
|
+
|
1663
|
+
<div id="method-M000307" class="method-detail">
|
1664
|
+
<a name="M000307"></a>
|
1665
|
+
|
1666
|
+
<div class="method-heading">
|
1667
|
+
<a href="#M000307" class="method-signature">
|
1668
|
+
<span class="method-name">symtbl=</span><span class="method-args">( aSymtbl )</span>
|
1669
|
+
</a>
|
1670
|
+
</div>
|
1671
|
+
|
1672
|
+
<div class="method-description">
|
1673
|
+
<p><a class="source-toggle" href="#"
|
1674
|
+
onclick="toggleCode('M000307-source');return false;">[Source]</a></p>
|
1675
|
+
<div class="method-source-code" id="M000307-source">
|
1676
|
+
<pre>
|
1677
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 581</span>
|
1678
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symtbl=</span> ( <span class="ruby-identifier">aSymtbl</span> )
|
1679
|
+
<span class="ruby-ivar">@symtbl</span> = <span class="ruby-identifier">aSymtbl</span>
|
1680
|
+
<span class="ruby-ivar">@log</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:log</span>]
|
1681
|
+
<span class="ruby-keyword kw">end</span>
|
1682
|
+
</pre>
|
1683
|
+
</div>
|
1684
|
+
</div>
|
1685
|
+
</div>
|
1686
|
+
|
1687
|
+
<div id="method-M000298" class="method-detail">
|
1688
|
+
<a name="M000298"></a>
|
1689
|
+
|
1690
|
+
<div class="method-heading">
|
1691
|
+
<a href="#M000298" class="method-signature">
|
1692
|
+
<span class="method-name">testify</span><span class="method-args">( aLoader=nil )</span>
|
1693
|
+
</a>
|
1694
|
+
</div>
|
1695
|
+
|
1696
|
+
<div class="method-description">
|
1697
|
+
<p>
|
1698
|
+
Build methods
|
1699
|
+
</p>
|
1700
|
+
<p><a class="source-toggle" href="#"
|
1701
|
+
onclick="toggleCode('M000298-source');return false;">[Source]</a></p>
|
1702
|
+
<div class="method-source-code" id="M000298-source">
|
1703
|
+
<pre>
|
1704
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 534</span>
|
1705
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testify</span> ( <span class="ruby-identifier">aLoader</span>=<span class="ruby-keyword kw">nil</span> )
|
1706
|
+
<span class="ruby-keyword kw">self</span>
|
1707
|
+
<span class="ruby-keyword kw">end</span>
|
1708
|
+
</pre>
|
1709
|
+
</div>
|
1710
|
+
</div>
|
1711
|
+
</div>
|
1712
|
+
|
1713
|
+
<div id="method-M000258" class="method-detail">
|
1714
|
+
<a name="M000258"></a>
|
1715
|
+
|
1716
|
+
<div class="method-heading">
|
1717
|
+
<a href="#M000258" class="method-signature">
|
1718
|
+
<span class="method-name">testify</span><span class="method-args">( aLoader=nil )</span>
|
1719
|
+
</a>
|
1720
|
+
</div>
|
1721
|
+
|
1722
|
+
<div class="method-description">
|
1723
|
+
<p>
|
1724
|
+
Build methods
|
1725
|
+
</p>
|
1726
|
+
<p><a class="source-toggle" href="#"
|
1727
|
+
onclick="toggleCode('M000258-source');return false;">[Source]</a></p>
|
1728
|
+
<div class="method-source-code" id="M000258-source">
|
1729
|
+
<pre>
|
1730
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 534</span>
|
1731
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testify</span> ( <span class="ruby-identifier">aLoader</span>=<span class="ruby-keyword kw">nil</span> )
|
1732
|
+
<span class="ruby-keyword kw">self</span>
|
1733
|
+
<span class="ruby-keyword kw">end</span>
|
1734
|
+
</pre>
|
1735
|
+
</div>
|
1736
|
+
</div>
|
1737
|
+
</div>
|
1738
|
+
|
1739
|
+
<div id="method-M000300" class="method-detail">
|
1740
|
+
<a name="M000300"></a>
|
1741
|
+
|
1742
|
+
<div class="method-heading">
|
1743
|
+
<a href="#M000300" class="method-signature">
|
1744
|
+
<span class="method-name">timeout=</span><span class="method-args">(other)</span>
|
1745
|
+
</a>
|
1746
|
+
</div>
|
1747
|
+
|
1748
|
+
<div class="method-description">
|
1749
|
+
<p><a class="source-toggle" href="#"
|
1750
|
+
onclick="toggleCode('M000300-source');return false;">[Source]</a></p>
|
1751
|
+
<div class="method-source-code" id="M000300-source">
|
1752
|
+
<pre>
|
1753
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 542</span>
|
1754
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timeout=</span>(<span class="ruby-identifier">other</span>)
|
1755
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0</span>
|
1756
|
+
<span class="ruby-ivar">@timeout</span> = <span class="ruby-identifier">other</span>
|
1757
|
+
<span class="ruby-keyword kw">else</span>
|
1758
|
+
<span class="ruby-identifier">raise</span>(<span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"`#{other}' - timeout delay must be >= 0"</span>)
|
1759
|
+
<span class="ruby-keyword kw">end</span>
|
1760
|
+
<span class="ruby-keyword kw">end</span>
|
1761
|
+
</pre>
|
1762
|
+
</div>
|
1763
|
+
</div>
|
1764
|
+
</div>
|
1765
|
+
|
1766
|
+
<div id="method-M000260" class="method-detail">
|
1767
|
+
<a name="M000260"></a>
|
1768
|
+
|
1769
|
+
<div class="method-heading">
|
1770
|
+
<a href="#M000260" class="method-signature">
|
1771
|
+
<span class="method-name">timeout=</span><span class="method-args">(other)</span>
|
1772
|
+
</a>
|
1773
|
+
</div>
|
1774
|
+
|
1775
|
+
<div class="method-description">
|
1776
|
+
<p><a class="source-toggle" href="#"
|
1777
|
+
onclick="toggleCode('M000260-source');return false;">[Source]</a></p>
|
1778
|
+
<div class="method-source-code" id="M000260-source">
|
1779
|
+
<pre>
|
1780
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 542</span>
|
1781
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timeout=</span>(<span class="ruby-identifier">other</span>)
|
1782
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0</span>
|
1783
|
+
<span class="ruby-ivar">@timeout</span> = <span class="ruby-identifier">other</span>
|
1784
|
+
<span class="ruby-keyword kw">else</span>
|
1785
|
+
<span class="ruby-identifier">raise</span>(<span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"`#{other}' - timeout delay must be >= 0"</span>)
|
1786
|
+
<span class="ruby-keyword kw">end</span>
|
1787
|
+
<span class="ruby-keyword kw">end</span>
|
1788
|
+
</pre>
|
1789
|
+
</div>
|
1790
|
+
</div>
|
1791
|
+
</div>
|
1792
|
+
|
1793
|
+
<div id="method-M000299" class="method-detail">
|
1794
|
+
<a name="M000299"></a>
|
1795
|
+
|
1796
|
+
<div class="method-heading">
|
1797
|
+
<a href="#M000299" class="method-signature">
|
1798
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
1799
|
+
</a>
|
1800
|
+
</div>
|
1801
|
+
|
1802
|
+
<div class="method-description">
|
1803
|
+
<p><a class="source-toggle" href="#"
|
1804
|
+
onclick="toggleCode('M000299-source');return false;">[Source]</a></p>
|
1805
|
+
<div class="method-source-code" id="M000299-source">
|
1806
|
+
<pre>
|
1807
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 538</span>
|
1808
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
1809
|
+
<span class="ruby-ivar">@name</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">path</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">super</span>
|
1810
|
+
<span class="ruby-keyword kw">end</span>
|
1811
|
+
</pre>
|
1812
|
+
</div>
|
1813
|
+
</div>
|
1814
|
+
</div>
|
1815
|
+
|
1816
|
+
<div id="method-M000259" class="method-detail">
|
1817
|
+
<a name="M000259"></a>
|
1818
|
+
|
1819
|
+
<div class="method-heading">
|
1820
|
+
<a href="#M000259" class="method-signature">
|
1821
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
1822
|
+
</a>
|
1823
|
+
</div>
|
1824
|
+
|
1825
|
+
<div class="method-description">
|
1826
|
+
<p><a class="source-toggle" href="#"
|
1827
|
+
onclick="toggleCode('M000259-source');return false;">[Source]</a></p>
|
1828
|
+
<div class="method-source-code" id="M000259-source">
|
1829
|
+
<pre>
|
1830
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 538</span>
|
1831
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
1832
|
+
<span class="ruby-ivar">@name</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">path</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">super</span>
|
1833
|
+
<span class="ruby-keyword kw">end</span>
|
1834
|
+
</pre>
|
1835
|
+
</div>
|
1836
|
+
</div>
|
1837
|
+
</div>
|
1838
|
+
|
1839
|
+
<div id="method-M000271" class="method-detail">
|
1840
|
+
<a name="M000271"></a>
|
1841
|
+
|
1842
|
+
<div class="method-heading">
|
1843
|
+
<a href="#M000271" class="method-signature">
|
1844
|
+
<span class="method-name">wclass=</span><span class="method-args">(other)</span>
|
1845
|
+
</a>
|
1846
|
+
</div>
|
1847
|
+
|
1848
|
+
<div class="method-description">
|
1849
|
+
<p>
|
1850
|
+
Custom accessors
|
1851
|
+
</p>
|
1852
|
+
<p><a class="source-toggle" href="#"
|
1853
|
+
onclick="toggleCode('M000271-source');return false;">[Source]</a></p>
|
1854
|
+
<div class="method-source-code" id="M000271-source">
|
1855
|
+
<pre>
|
1856
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 222</span>
|
1857
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wclass=</span>(<span class="ruby-identifier">other</span>)
|
1858
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Class</span>)
|
1859
|
+
<span class="ruby-ivar">@wclass</span> = <span class="ruby-identifier">other</span>
|
1860
|
+
<span class="ruby-keyword kw">else</span>
|
1861
|
+
<span class="ruby-ivar">@wclass</span> = <span class="ruby-constant">TTK</span><span class="ruby-operator">::</span><span class="ruby-constant">Weights</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_s</span>)
|
1862
|
+
<span class="ruby-keyword kw">end</span>
|
1863
|
+
<span class="ruby-keyword kw">end</span>
|
1864
|
+
</pre>
|
1865
|
+
</div>
|
1866
|
+
</div>
|
1867
|
+
</div>
|
1868
|
+
|
1869
|
+
<div id="method-M000231" class="method-detail">
|
1870
|
+
<a name="M000231"></a>
|
1871
|
+
|
1872
|
+
<div class="method-heading">
|
1873
|
+
<a href="#M000231" class="method-signature">
|
1874
|
+
<span class="method-name">wclass=</span><span class="method-args">(other)</span>
|
1875
|
+
</a>
|
1876
|
+
</div>
|
1877
|
+
|
1878
|
+
<div class="method-description">
|
1879
|
+
<p>
|
1880
|
+
Custom accessors
|
1881
|
+
</p>
|
1882
|
+
<p><a class="source-toggle" href="#"
|
1883
|
+
onclick="toggleCode('M000231-source');return false;">[Source]</a></p>
|
1884
|
+
<div class="method-source-code" id="M000231-source">
|
1885
|
+
<pre>
|
1886
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 222</span>
|
1887
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wclass=</span>(<span class="ruby-identifier">other</span>)
|
1888
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Class</span>)
|
1889
|
+
<span class="ruby-ivar">@wclass</span> = <span class="ruby-identifier">other</span>
|
1890
|
+
<span class="ruby-keyword kw">else</span>
|
1891
|
+
<span class="ruby-ivar">@wclass</span> = <span class="ruby-constant">TTK</span><span class="ruby-operator">::</span><span class="ruby-constant">Weights</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_s</span>)
|
1892
|
+
<span class="ruby-keyword kw">end</span>
|
1893
|
+
<span class="ruby-keyword kw">end</span>
|
1894
|
+
</pre>
|
1895
|
+
</div>
|
1896
|
+
</div>
|
1897
|
+
</div>
|
1898
|
+
|
1899
|
+
<h3 class="section-bar">Protected Instance methods</h3>
|
1900
|
+
|
1901
|
+
<div id="method-M000288" class="method-detail">
|
1902
|
+
<a name="M000288"></a>
|
1903
|
+
|
1904
|
+
<div class="method-heading">
|
1905
|
+
<a href="#M000288" class="method-signature">
|
1906
|
+
<span class="method-name">abort_hook</span><span class="method-args">()</span>
|
1907
|
+
</a>
|
1908
|
+
</div>
|
1909
|
+
|
1910
|
+
<div class="method-description">
|
1911
|
+
<p>
|
1912
|
+
Here you can do some tasks when the test is aborted.
|
1913
|
+
</p>
|
1914
|
+
<p><a class="source-toggle" href="#"
|
1915
|
+
onclick="toggleCode('M000288-source');return false;">[Source]</a></p>
|
1916
|
+
<div class="method-source-code" id="M000288-source">
|
1917
|
+
<pre>
|
1918
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 468</span>
|
1919
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abort_hook</span>
|
1920
|
+
<span class="ruby-keyword kw">end</span>
|
1921
|
+
</pre>
|
1922
|
+
</div>
|
1923
|
+
</div>
|
1924
|
+
</div>
|
1925
|
+
|
1926
|
+
<div id="method-M000248" class="method-detail">
|
1927
|
+
<a name="M000248"></a>
|
1928
|
+
|
1929
|
+
<div class="method-heading">
|
1930
|
+
<a href="#M000248" class="method-signature">
|
1931
|
+
<span class="method-name">abort_hook</span><span class="method-args">()</span>
|
1932
|
+
</a>
|
1933
|
+
</div>
|
1934
|
+
|
1935
|
+
<div class="method-description">
|
1936
|
+
<p>
|
1937
|
+
Here you can do some tasks when the test is aborted.
|
1938
|
+
</p>
|
1939
|
+
<p><a class="source-toggle" href="#"
|
1940
|
+
onclick="toggleCode('M000248-source');return false;">[Source]</a></p>
|
1941
|
+
<div class="method-source-code" id="M000248-source">
|
1942
|
+
<pre>
|
1943
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 468</span>
|
1944
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abort_hook</span>
|
1945
|
+
<span class="ruby-keyword kw">end</span>
|
1946
|
+
</pre>
|
1947
|
+
</div>
|
1948
|
+
</div>
|
1949
|
+
</div>
|
1950
|
+
|
1951
|
+
<div id="method-M000283" class="method-detail">
|
1952
|
+
<a name="M000283"></a>
|
1953
|
+
|
1954
|
+
<div class="method-heading">
|
1955
|
+
<a href="#M000283" class="method-signature">
|
1956
|
+
<span class="method-name">assertion</span><span class="method-args">()</span>
|
1957
|
+
</a>
|
1958
|
+
</div>
|
1959
|
+
|
1960
|
+
<div class="method-description">
|
1961
|
+
<p>
|
1962
|
+
Exploit the results and assert when you want
|
1963
|
+
</p>
|
1964
|
+
<p><a class="source-toggle" href="#"
|
1965
|
+
onclick="toggleCode('M000283-source');return false;">[Source]</a></p>
|
1966
|
+
<div class="method-source-code" id="M000283-source">
|
1967
|
+
<pre>
|
1968
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 434</span>
|
1969
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assertion</span>
|
1970
|
+
<span class="ruby-keyword kw">end</span>
|
1971
|
+
</pre>
|
1972
|
+
</div>
|
1973
|
+
</div>
|
1974
|
+
</div>
|
1975
|
+
|
1976
|
+
<div id="method-M000243" class="method-detail">
|
1977
|
+
<a name="M000243"></a>
|
1978
|
+
|
1979
|
+
<div class="method-heading">
|
1980
|
+
<a href="#M000243" class="method-signature">
|
1981
|
+
<span class="method-name">assertion</span><span class="method-args">()</span>
|
1982
|
+
</a>
|
1983
|
+
</div>
|
1984
|
+
|
1985
|
+
<div class="method-description">
|
1986
|
+
<p>
|
1987
|
+
Exploit the results and assert when you want
|
1988
|
+
</p>
|
1989
|
+
<p><a class="source-toggle" href="#"
|
1990
|
+
onclick="toggleCode('M000243-source');return false;">[Source]</a></p>
|
1991
|
+
<div class="method-source-code" id="M000243-source">
|
1992
|
+
<pre>
|
1993
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 434</span>
|
1994
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assertion</span>
|
1995
|
+
<span class="ruby-keyword kw">end</span>
|
1996
|
+
</pre>
|
1997
|
+
</div>
|
1998
|
+
</div>
|
1999
|
+
</div>
|
2000
|
+
|
2001
|
+
<div id="method-M000233" class="method-detail">
|
2002
|
+
<a name="M000233"></a>
|
2003
|
+
|
2004
|
+
<div class="method-heading">
|
2005
|
+
<a href="#M000233" class="method-signature">
|
2006
|
+
<span class="method-name">assign_at_last</span><span class="method-args">()</span>
|
2007
|
+
</a>
|
2008
|
+
</div>
|
2009
|
+
|
2010
|
+
<div class="method-description">
|
2011
|
+
<p>
|
2012
|
+
This can be overrided to specify which attribute is assign at last.
|
2013
|
+
</p>
|
2014
|
+
<p><a class="source-toggle" href="#"
|
2015
|
+
onclick="toggleCode('M000233-source');return false;">[Source]</a></p>
|
2016
|
+
<div class="method-source-code" id="M000233-source">
|
2017
|
+
<pre>
|
2018
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 249</span>
|
2019
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assign_at_last</span>
|
2020
|
+
<span class="ruby-keyword kw">nil</span>
|
2021
|
+
<span class="ruby-keyword kw">end</span>
|
2022
|
+
</pre>
|
2023
|
+
</div>
|
2024
|
+
</div>
|
2025
|
+
</div>
|
2026
|
+
|
2027
|
+
<div id="method-M000273" class="method-detail">
|
2028
|
+
<a name="M000273"></a>
|
2029
|
+
|
2030
|
+
<div class="method-heading">
|
2031
|
+
<a href="#M000273" class="method-signature">
|
2032
|
+
<span class="method-name">assign_at_last</span><span class="method-args">()</span>
|
2033
|
+
</a>
|
2034
|
+
</div>
|
2035
|
+
|
2036
|
+
<div class="method-description">
|
2037
|
+
<p>
|
2038
|
+
This can be overrided to specify which attribute is assign at last.
|
2039
|
+
</p>
|
2040
|
+
<p><a class="source-toggle" href="#"
|
2041
|
+
onclick="toggleCode('M000273-source');return false;">[Source]</a></p>
|
2042
|
+
<div class="method-source-code" id="M000273-source">
|
2043
|
+
<pre>
|
2044
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 249</span>
|
2045
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assign_at_last</span>
|
2046
|
+
<span class="ruby-keyword kw">nil</span>
|
2047
|
+
<span class="ruby-keyword kw">end</span>
|
2048
|
+
</pre>
|
2049
|
+
</div>
|
2050
|
+
</div>
|
2051
|
+
</div>
|
2052
|
+
|
2053
|
+
<div id="method-M000232" class="method-detail">
|
2054
|
+
<a name="M000232"></a>
|
2055
|
+
|
2056
|
+
<div class="method-heading">
|
2057
|
+
<a href="#M000232" class="method-signature">
|
2058
|
+
<span class="method-name">assign_one</span><span class="method-args">(key, val, silent=false)</span>
|
2059
|
+
</a>
|
2060
|
+
</div>
|
2061
|
+
|
2062
|
+
<div class="method-description">
|
2063
|
+
<p>
|
2064
|
+
Assign an attribute safely from a key:<a
|
2065
|
+
href="../../String.html">String</a> and a value.
|
2066
|
+
</p>
|
2067
|
+
<p><a class="source-toggle" href="#"
|
2068
|
+
onclick="toggleCode('M000232-source');return false;">[Source]</a></p>
|
2069
|
+
<div class="method-source-code" id="M000232-source">
|
2070
|
+
<pre>
|
2071
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 235</span>
|
2072
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assign_one</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span>, <span class="ruby-identifier">silent</span>=<span class="ruby-keyword kw">false</span>)
|
2073
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> [<span class="ruby-identifier">:strategy</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>
|
2074
|
+
<span class="ruby-identifier">meth</span> = <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'='</span>
|
2075
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">val</span>.<span class="ruby-identifier">nil?</span>
|
2076
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">meth</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:method_missing</span>)
|
2077
|
+
<span class="ruby-identifier">send</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-identifier">val</span>)
|
2078
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">silent</span>
|
2079
|
+
<span class="ruby-ivar">@log</span>.<span class="ruby-identifier">log_warn</span> { <span class="ruby-node">"Attribute #{key} not found for #{self.class}"</span>}
|
2080
|
+
<span class="ruby-keyword kw">end</span>
|
2081
|
+
<span class="ruby-keyword kw">end</span>
|
2082
|
+
<span class="ruby-keyword kw">end</span>
|
2083
|
+
</pre>
|
2084
|
+
</div>
|
2085
|
+
</div>
|
2086
|
+
</div>
|
2087
|
+
|
2088
|
+
<div id="method-M000272" class="method-detail">
|
2089
|
+
<a name="M000272"></a>
|
2090
|
+
|
2091
|
+
<div class="method-heading">
|
2092
|
+
<a href="#M000272" class="method-signature">
|
2093
|
+
<span class="method-name">assign_one</span><span class="method-args">(key, val, silent=false)</span>
|
2094
|
+
</a>
|
2095
|
+
</div>
|
2096
|
+
|
2097
|
+
<div class="method-description">
|
2098
|
+
<p>
|
2099
|
+
Assign an attribute safely from a key:<a
|
2100
|
+
href="../../String.html">String</a> and a value.
|
2101
|
+
</p>
|
2102
|
+
<p><a class="source-toggle" href="#"
|
2103
|
+
onclick="toggleCode('M000272-source');return false;">[Source]</a></p>
|
2104
|
+
<div class="method-source-code" id="M000272-source">
|
2105
|
+
<pre>
|
2106
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 235</span>
|
2107
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assign_one</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span>, <span class="ruby-identifier">silent</span>=<span class="ruby-keyword kw">false</span>)
|
2108
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> [<span class="ruby-identifier">:strategy</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>
|
2109
|
+
<span class="ruby-identifier">meth</span> = <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'='</span>
|
2110
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">val</span>.<span class="ruby-identifier">nil?</span>
|
2111
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">meth</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:method_missing</span>)
|
2112
|
+
<span class="ruby-identifier">send</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-identifier">val</span>)
|
2113
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">silent</span>
|
2114
|
+
<span class="ruby-ivar">@log</span>.<span class="ruby-identifier">log_warn</span> { <span class="ruby-node">"Attribute #{key} not found for #{self.class}"</span>}
|
2115
|
+
<span class="ruby-keyword kw">end</span>
|
2116
|
+
<span class="ruby-keyword kw">end</span>
|
2117
|
+
<span class="ruby-keyword kw">end</span>
|
2118
|
+
</pre>
|
2119
|
+
</div>
|
2120
|
+
</div>
|
2121
|
+
</div>
|
2122
|
+
|
2123
|
+
<div id="method-M000239" class="method-detail">
|
2124
|
+
<a name="M000239"></a>
|
2125
|
+
|
2126
|
+
<div class="method-heading">
|
2127
|
+
<a href="#M000239" class="method-signature">
|
2128
|
+
<span class="method-name">check_assertion</span><span class="method-args">( header, assertion )</span>
|
2129
|
+
</a>
|
2130
|
+
</div>
|
2131
|
+
|
2132
|
+
<div class="method-description">
|
2133
|
+
<p><a class="source-toggle" href="#"
|
2134
|
+
onclick="toggleCode('M000239-source');return false;">[Source]</a></p>
|
2135
|
+
<div class="method-source-code" id="M000239-source">
|
2136
|
+
<pre>
|
2137
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 356</span>
|
2138
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">check_assertion</span> ( <span class="ruby-identifier">header</span>, <span class="ruby-identifier">assertion</span> )
|
2139
|
+
<span class="ruby-identifier">bind</span> = {}
|
2140
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-value str">''</span>
|
2141
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">assertion</span>
|
2142
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>
|
2143
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">assertion</span>.<span class="ruby-identifier">empty?</span>
|
2144
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span>
|
2145
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">assertion</span>.<span class="ruby-identifier">empty?</span>
|
2146
|
+
<span class="ruby-identifier">bind</span> = <span class="ruby-identifier">assertion</span>[<span class="ruby-identifier">:files</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">assertion</span>[<span class="ruby-identifier">:files</span>].<span class="ruby-identifier">nil?</span>
|
2147
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">assertion</span>[<span class="ruby-identifier">:assert</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">assertion</span>[<span class="ruby-identifier">:assert</span>].<span class="ruby-identifier">nil?</span>
|
2148
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
|
2149
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">assertion</span>.<span class="ruby-identifier">empty?</span>
|
2150
|
+
<span class="ruby-identifier">assertion</span>.<span class="ruby-identifier">all?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">check_assertion</span>(<span class="ruby-identifier">header</span>, <span class="ruby-identifier">a</span>) }
|
2151
|
+
<span class="ruby-keyword kw">else</span>
|
2152
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">assertion</span>.<span class="ruby-identifier">to_s</span>
|
2153
|
+
<span class="ruby-keyword kw">end</span>
|
2154
|
+
<span class="ruby-ivar">@assert_eval</span>.<span class="ruby-identifier">run</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">bind</span>, <span class="ruby-node">"(#@name:#{header})"</span>)
|
2155
|
+
<span class="ruby-keyword kw">end</span>
|
2156
|
+
</pre>
|
2157
|
+
</div>
|
2158
|
+
</div>
|
2159
|
+
</div>
|
2160
|
+
|
2161
|
+
<div id="method-M000279" class="method-detail">
|
2162
|
+
<a name="M000279"></a>
|
2163
|
+
|
2164
|
+
<div class="method-heading">
|
2165
|
+
<a href="#M000279" class="method-signature">
|
2166
|
+
<span class="method-name">check_assertion</span><span class="method-args">( header, assertion )</span>
|
2167
|
+
</a>
|
2168
|
+
</div>
|
2169
|
+
|
2170
|
+
<div class="method-description">
|
2171
|
+
<p><a class="source-toggle" href="#"
|
2172
|
+
onclick="toggleCode('M000279-source');return false;">[Source]</a></p>
|
2173
|
+
<div class="method-source-code" id="M000279-source">
|
2174
|
+
<pre>
|
2175
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 356</span>
|
2176
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">check_assertion</span> ( <span class="ruby-identifier">header</span>, <span class="ruby-identifier">assertion</span> )
|
2177
|
+
<span class="ruby-identifier">bind</span> = {}
|
2178
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-value str">''</span>
|
2179
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">assertion</span>
|
2180
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>
|
2181
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">assertion</span>.<span class="ruby-identifier">empty?</span>
|
2182
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span>
|
2183
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">assertion</span>.<span class="ruby-identifier">empty?</span>
|
2184
|
+
<span class="ruby-identifier">bind</span> = <span class="ruby-identifier">assertion</span>[<span class="ruby-identifier">:files</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">assertion</span>[<span class="ruby-identifier">:files</span>].<span class="ruby-identifier">nil?</span>
|
2185
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">assertion</span>[<span class="ruby-identifier">:assert</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">assertion</span>[<span class="ruby-identifier">:assert</span>].<span class="ruby-identifier">nil?</span>
|
2186
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
|
2187
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">assertion</span>.<span class="ruby-identifier">empty?</span>
|
2188
|
+
<span class="ruby-identifier">assertion</span>.<span class="ruby-identifier">all?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">check_assertion</span>(<span class="ruby-identifier">header</span>, <span class="ruby-identifier">a</span>) }
|
2189
|
+
<span class="ruby-keyword kw">else</span>
|
2190
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">assertion</span>.<span class="ruby-identifier">to_s</span>
|
2191
|
+
<span class="ruby-keyword kw">end</span>
|
2192
|
+
<span class="ruby-ivar">@assert_eval</span>.<span class="ruby-identifier">run</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">bind</span>, <span class="ruby-node">"(#@name:#{header})"</span>)
|
2193
|
+
<span class="ruby-keyword kw">end</span>
|
2194
|
+
</pre>
|
2195
|
+
</div>
|
2196
|
+
</div>
|
2197
|
+
</div>
|
2198
|
+
|
2199
|
+
<div id="method-M000285" class="method-detail">
|
2200
|
+
<a name="M000285"></a>
|
2201
|
+
|
2202
|
+
<div class="method-heading">
|
2203
|
+
<a href="#M000285" class="method-signature">
|
2204
|
+
<span class="method-name">epilogue</span><span class="method-args">()</span>
|
2205
|
+
</a>
|
2206
|
+
</div>
|
2207
|
+
|
2208
|
+
<div class="method-description">
|
2209
|
+
<p>
|
2210
|
+
Display conclusions. Here you can finish some tasks even when the test
|
2211
|
+
fails. Exceptions are absolutly forbidden in this method.
|
2212
|
+
</p>
|
2213
|
+
<p><a class="source-toggle" href="#"
|
2214
|
+
onclick="toggleCode('M000285-source');return false;">[Source]</a></p>
|
2215
|
+
<div class="method-source-code" id="M000285-source">
|
2216
|
+
<pre>
|
2217
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 449</span>
|
2218
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">epilogue</span>
|
2219
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@save</span>.<span class="ruby-identifier">nil?</span>
|
2220
|
+
<span class="ruby-ivar">@save</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">send</span>(<span class="ruby-node">"#{k}="</span>, <span class="ruby-identifier">v</span>) }
|
2221
|
+
<span class="ruby-ivar">@save</span>.<span class="ruby-identifier">clear</span>
|
2222
|
+
<span class="ruby-keyword kw">end</span>
|
2223
|
+
<span class="ruby-keyword kw">end</span>
|
2224
|
+
</pre>
|
2225
|
+
</div>
|
2226
|
+
</div>
|
2227
|
+
</div>
|
2228
|
+
|
2229
|
+
<div id="method-M000245" class="method-detail">
|
2230
|
+
<a name="M000245"></a>
|
2231
|
+
|
2232
|
+
<div class="method-heading">
|
2233
|
+
<a href="#M000245" class="method-signature">
|
2234
|
+
<span class="method-name">epilogue</span><span class="method-args">()</span>
|
2235
|
+
</a>
|
2236
|
+
</div>
|
2237
|
+
|
2238
|
+
<div class="method-description">
|
2239
|
+
<p>
|
2240
|
+
Display conclusions. Here you can finish some tasks even when the test
|
2241
|
+
fails. Exceptions are absolutly forbidden in this method.
|
2242
|
+
</p>
|
2243
|
+
<p><a class="source-toggle" href="#"
|
2244
|
+
onclick="toggleCode('M000245-source');return false;">[Source]</a></p>
|
2245
|
+
<div class="method-source-code" id="M000245-source">
|
2246
|
+
<pre>
|
2247
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 449</span>
|
2248
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">epilogue</span>
|
2249
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@save</span>.<span class="ruby-identifier">nil?</span>
|
2250
|
+
<span class="ruby-ivar">@save</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">send</span>(<span class="ruby-node">"#{k}="</span>, <span class="ruby-identifier">v</span>) }
|
2251
|
+
<span class="ruby-ivar">@save</span>.<span class="ruby-identifier">clear</span>
|
2252
|
+
<span class="ruby-keyword kw">end</span>
|
2253
|
+
<span class="ruby-keyword kw">end</span>
|
2254
|
+
</pre>
|
2255
|
+
</div>
|
2256
|
+
</div>
|
2257
|
+
</div>
|
2258
|
+
|
2259
|
+
<div id="method-M000287" class="method-detail">
|
2260
|
+
<a name="M000287"></a>
|
2261
|
+
|
2262
|
+
<div class="method-heading">
|
2263
|
+
<a href="#M000287" class="method-signature">
|
2264
|
+
<span class="method-name">error_hook</span><span class="method-args">()</span>
|
2265
|
+
</a>
|
2266
|
+
</div>
|
2267
|
+
|
2268
|
+
<div class="method-description">
|
2269
|
+
<p>
|
2270
|
+
Here you can do some tasks when an error occur during the test.
|
2271
|
+
</p>
|
2272
|
+
<p><a class="source-toggle" href="#"
|
2273
|
+
onclick="toggleCode('M000287-source');return false;">[Source]</a></p>
|
2274
|
+
<div class="method-source-code" id="M000287-source">
|
2275
|
+
<pre>
|
2276
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 463</span>
|
2277
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">error_hook</span>
|
2278
|
+
<span class="ruby-keyword kw">end</span>
|
2279
|
+
</pre>
|
2280
|
+
</div>
|
2281
|
+
</div>
|
2282
|
+
</div>
|
2283
|
+
|
2284
|
+
<div id="method-M000247" class="method-detail">
|
2285
|
+
<a name="M000247"></a>
|
2286
|
+
|
2287
|
+
<div class="method-heading">
|
2288
|
+
<a href="#M000247" class="method-signature">
|
2289
|
+
<span class="method-name">error_hook</span><span class="method-args">()</span>
|
2290
|
+
</a>
|
2291
|
+
</div>
|
2292
|
+
|
2293
|
+
<div class="method-description">
|
2294
|
+
<p>
|
2295
|
+
Here you can do some tasks when an error occur during the test.
|
2296
|
+
</p>
|
2297
|
+
<p><a class="source-toggle" href="#"
|
2298
|
+
onclick="toggleCode('M000247-source');return false;">[Source]</a></p>
|
2299
|
+
<div class="method-source-code" id="M000247-source">
|
2300
|
+
<pre>
|
2301
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 463</span>
|
2302
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">error_hook</span>
|
2303
|
+
<span class="ruby-keyword kw">end</span>
|
2304
|
+
</pre>
|
2305
|
+
</div>
|
2306
|
+
</div>
|
2307
|
+
</div>
|
2308
|
+
|
2309
|
+
<div id="method-M000246" class="method-detail">
|
2310
|
+
<a name="M000246"></a>
|
2311
|
+
|
2312
|
+
<div class="method-heading">
|
2313
|
+
<a href="#M000246" class="method-signature">
|
2314
|
+
<span class="method-name">failed_hook</span><span class="method-args">()</span>
|
2315
|
+
</a>
|
2316
|
+
</div>
|
2317
|
+
|
2318
|
+
<div class="method-description">
|
2319
|
+
<p>
|
2320
|
+
Here you can do some tasks when the test failed.
|
2321
|
+
</p>
|
2322
|
+
<p><a class="source-toggle" href="#"
|
2323
|
+
onclick="toggleCode('M000246-source');return false;">[Source]</a></p>
|
2324
|
+
<div class="method-source-code" id="M000246-source">
|
2325
|
+
<pre>
|
2326
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 458</span>
|
2327
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">failed_hook</span>
|
2328
|
+
<span class="ruby-keyword kw">end</span>
|
2329
|
+
</pre>
|
2330
|
+
</div>
|
2331
|
+
</div>
|
2332
|
+
</div>
|
2333
|
+
|
2334
|
+
<div id="method-M000286" class="method-detail">
|
2335
|
+
<a name="M000286"></a>
|
2336
|
+
|
2337
|
+
<div class="method-heading">
|
2338
|
+
<a href="#M000286" class="method-signature">
|
2339
|
+
<span class="method-name">failed_hook</span><span class="method-args">()</span>
|
2340
|
+
</a>
|
2341
|
+
</div>
|
2342
|
+
|
2343
|
+
<div class="method-description">
|
2344
|
+
<p>
|
2345
|
+
Here you can do some tasks when the test failed.
|
2346
|
+
</p>
|
2347
|
+
<p><a class="source-toggle" href="#"
|
2348
|
+
onclick="toggleCode('M000286-source');return false;">[Source]</a></p>
|
2349
|
+
<div class="method-source-code" id="M000286-source">
|
2350
|
+
<pre>
|
2351
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 458</span>
|
2352
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">failed_hook</span>
|
2353
|
+
<span class="ruby-keyword kw">end</span>
|
2354
|
+
</pre>
|
2355
|
+
</div>
|
2356
|
+
</div>
|
2357
|
+
</div>
|
2358
|
+
|
2359
|
+
<div id="method-M000250" class="method-detail">
|
2360
|
+
<a name="M000250"></a>
|
2361
|
+
|
2362
|
+
<div class="method-heading">
|
2363
|
+
<a href="#M000250" class="method-signature">
|
2364
|
+
<span class="method-name">pass_hook</span><span class="method-args">()</span>
|
2365
|
+
</a>
|
2366
|
+
</div>
|
2367
|
+
|
2368
|
+
<div class="method-description">
|
2369
|
+
<p>
|
2370
|
+
Here you can do some tasks when the test is passed.
|
2371
|
+
</p>
|
2372
|
+
<p><a class="source-toggle" href="#"
|
2373
|
+
onclick="toggleCode('M000250-source');return false;">[Source]</a></p>
|
2374
|
+
<div class="method-source-code" id="M000250-source">
|
2375
|
+
<pre>
|
2376
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 478</span>
|
2377
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pass_hook</span>
|
2378
|
+
<span class="ruby-keyword kw">end</span>
|
2379
|
+
</pre>
|
2380
|
+
</div>
|
2381
|
+
</div>
|
2382
|
+
</div>
|
2383
|
+
|
2384
|
+
<div id="method-M000290" class="method-detail">
|
2385
|
+
<a name="M000290"></a>
|
2386
|
+
|
2387
|
+
<div class="method-heading">
|
2388
|
+
<a href="#M000290" class="method-signature">
|
2389
|
+
<span class="method-name">pass_hook</span><span class="method-args">()</span>
|
2390
|
+
</a>
|
2391
|
+
</div>
|
2392
|
+
|
2393
|
+
<div class="method-description">
|
2394
|
+
<p>
|
2395
|
+
Here you can do some tasks when the test is passed.
|
2396
|
+
</p>
|
2397
|
+
<p><a class="source-toggle" href="#"
|
2398
|
+
onclick="toggleCode('M000290-source');return false;">[Source]</a></p>
|
2399
|
+
<div class="method-source-code" id="M000290-source">
|
2400
|
+
<pre>
|
2401
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 478</span>
|
2402
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pass_hook</span>
|
2403
|
+
<span class="ruby-keyword kw">end</span>
|
2404
|
+
</pre>
|
2405
|
+
</div>
|
2406
|
+
</div>
|
2407
|
+
</div>
|
2408
|
+
|
2409
|
+
<div id="method-M000284" class="method-detail">
|
2410
|
+
<a name="M000284"></a>
|
2411
|
+
|
2412
|
+
<div class="method-heading">
|
2413
|
+
<a href="#M000284" class="method-signature">
|
2414
|
+
<span class="method-name">post_assertion</span><span class="method-args">()</span>
|
2415
|
+
</a>
|
2416
|
+
</div>
|
2417
|
+
|
2418
|
+
<div class="method-description">
|
2419
|
+
<p><a class="source-toggle" href="#"
|
2420
|
+
onclick="toggleCode('M000284-source');return false;">[Source]</a></p>
|
2421
|
+
<div class="method-source-code" id="M000284-source">
|
2422
|
+
<pre>
|
2423
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 439</span>
|
2424
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_assertion</span>
|
2425
|
+
<span class="ruby-ivar">@assert_eval</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">AssertEval</span>.<span class="ruby-identifier">new</span>
|
2426
|
+
<span class="ruby-identifier">check_assertion</span>(<span class="ruby-value str">'post-assertions: '</span>, <span class="ruby-ivar">@post_assertion</span>)
|
2427
|
+
<span class="ruby-keyword kw">end</span>
|
2428
|
+
</pre>
|
2429
|
+
</div>
|
2430
|
+
</div>
|
2431
|
+
</div>
|
2432
|
+
|
2433
|
+
<div id="method-M000244" class="method-detail">
|
2434
|
+
<a name="M000244"></a>
|
2435
|
+
|
2436
|
+
<div class="method-heading">
|
2437
|
+
<a href="#M000244" class="method-signature">
|
2438
|
+
<span class="method-name">post_assertion</span><span class="method-args">()</span>
|
2439
|
+
</a>
|
2440
|
+
</div>
|
2441
|
+
|
2442
|
+
<div class="method-description">
|
2443
|
+
<p><a class="source-toggle" href="#"
|
2444
|
+
onclick="toggleCode('M000244-source');return false;">[Source]</a></p>
|
2445
|
+
<div class="method-source-code" id="M000244-source">
|
2446
|
+
<pre>
|
2447
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 439</span>
|
2448
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_assertion</span>
|
2449
|
+
<span class="ruby-ivar">@assert_eval</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">AssertEval</span>.<span class="ruby-identifier">new</span>
|
2450
|
+
<span class="ruby-identifier">check_assertion</span>(<span class="ruby-value str">'post-assertions: '</span>, <span class="ruby-ivar">@post_assertion</span>)
|
2451
|
+
<span class="ruby-keyword kw">end</span>
|
2452
|
+
</pre>
|
2453
|
+
</div>
|
2454
|
+
</div>
|
2455
|
+
</div>
|
2456
|
+
|
2457
|
+
<div id="method-M000240" class="method-detail">
|
2458
|
+
<a name="M000240"></a>
|
2459
|
+
|
2460
|
+
<div class="method-heading">
|
2461
|
+
<a href="#M000240" class="method-signature">
|
2462
|
+
<span class="method-name">pre_assertion</span><span class="method-args">()</span>
|
2463
|
+
</a>
|
2464
|
+
</div>
|
2465
|
+
|
2466
|
+
<div class="method-description">
|
2467
|
+
<p><a class="source-toggle" href="#"
|
2468
|
+
onclick="toggleCode('M000240-source');return false;">[Source]</a></p>
|
2469
|
+
<div class="method-source-code" id="M000240-source">
|
2470
|
+
<pre>
|
2471
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 377</span>
|
2472
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre_assertion</span>
|
2473
|
+
<span class="ruby-ivar">@assert_eval</span> = <span class="ruby-constant">AssertEval</span>.<span class="ruby-identifier">new</span>
|
2474
|
+
<span class="ruby-identifier">check_assertion</span>(<span class="ruby-value str">'pre-assertion: '</span>, <span class="ruby-ivar">@pre_assertion</span>)
|
2475
|
+
<span class="ruby-keyword kw">end</span>
|
2476
|
+
</pre>
|
2477
|
+
</div>
|
2478
|
+
</div>
|
2479
|
+
</div>
|
2480
|
+
|
2481
|
+
<div id="method-M000280" class="method-detail">
|
2482
|
+
<a name="M000280"></a>
|
2483
|
+
|
2484
|
+
<div class="method-heading">
|
2485
|
+
<a href="#M000280" class="method-signature">
|
2486
|
+
<span class="method-name">pre_assertion</span><span class="method-args">()</span>
|
2487
|
+
</a>
|
2488
|
+
</div>
|
2489
|
+
|
2490
|
+
<div class="method-description">
|
2491
|
+
<p><a class="source-toggle" href="#"
|
2492
|
+
onclick="toggleCode('M000280-source');return false;">[Source]</a></p>
|
2493
|
+
<div class="method-source-code" id="M000280-source">
|
2494
|
+
<pre>
|
2495
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 377</span>
|
2496
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre_assertion</span>
|
2497
|
+
<span class="ruby-ivar">@assert_eval</span> = <span class="ruby-constant">AssertEval</span>.<span class="ruby-identifier">new</span>
|
2498
|
+
<span class="ruby-identifier">check_assertion</span>(<span class="ruby-value str">'pre-assertion: '</span>, <span class="ruby-ivar">@pre_assertion</span>)
|
2499
|
+
<span class="ruby-keyword kw">end</span>
|
2500
|
+
</pre>
|
2501
|
+
</div>
|
2502
|
+
</div>
|
2503
|
+
</div>
|
2504
|
+
|
2505
|
+
<div id="method-M000241" class="method-detail">
|
2506
|
+
<a name="M000241"></a>
|
2507
|
+
|
2508
|
+
<div class="method-heading">
|
2509
|
+
<a href="#M000241" class="method-signature">
|
2510
|
+
<span class="method-name">prologue</span><span class="method-args">()</span>
|
2511
|
+
</a>
|
2512
|
+
</div>
|
2513
|
+
|
2514
|
+
<div class="method-description">
|
2515
|
+
<p>
|
2516
|
+
Display test attributes. Attributes displayed and their order is specified
|
2517
|
+
by the class attribute <em>attributes</em>.
|
2518
|
+
</p>
|
2519
|
+
<p><a class="source-toggle" href="#"
|
2520
|
+
onclick="toggleCode('M000241-source');return false;">[Source]</a></p>
|
2521
|
+
<div class="method-source-code" id="M000241-source">
|
2522
|
+
<pre>
|
2523
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 386</span>
|
2524
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prologue</span>
|
2525
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:loader</span>].<span class="ruby-identifier">nil?</span>
|
2526
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'no loader in the symtbl'</span>
|
2527
|
+
<span class="ruby-keyword kw">end</span>
|
2528
|
+
<span class="ruby-ivar">@save</span> = {}
|
2529
|
+
<span class="ruby-identifier">res</span> = <span class="ruby-constant">OHash</span>.<span class="ruby-identifier">new</span>
|
2530
|
+
<span class="ruby-identifier">check_attributes</span>
|
2531
|
+
<span class="ruby-identifier">each_attribute</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">attr</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
|
2532
|
+
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">nil?</span>
|
2533
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">name</span>
|
2534
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">expand?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">new_val</span> = <span class="ruby-identifier">val</span>.<span class="ruby-identifier">symtbl_gsub</span>(<span class="ruby-ivar">@symtbl</span>)
|
2535
|
+
<span class="ruby-ivar">@save</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">val</span>
|
2536
|
+
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">new_val</span>
|
2537
|
+
<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{name}="</span>, <span class="ruby-identifier">val</span>)
|
2538
|
+
<span class="ruby-keyword kw">end</span>
|
2539
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">visible?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@reject</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">name</span>
|
2540
|
+
<span class="ruby-identifier">res</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">val</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">default</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:name</span>
|
2541
|
+
<span class="ruby-keyword kw">end</span>
|
2542
|
+
<span class="ruby-keyword kw">end</span>
|
2543
|
+
<span class="ruby-ivar">@symbols</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
2544
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>
|
2545
|
+
<span class="ruby-keyword kw">end</span>
|
2546
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@reject</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">:name</span>
|
2547
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:pathname</span>].<span class="ruby-identifier">nil?</span>
|
2548
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:pathname</span>] = (<span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">to_sym</span>
|
2549
|
+
<span class="ruby-keyword kw">else</span>
|
2550
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:pathname</span>] = <span class="ruby-node">"#{@symtbl[:pathname]}/#{self.name}"</span><span class="ruby-node">"#{@symtbl[:pathname]}/#{self.name}"</span>
|
2551
|
+
<span class="ruby-keyword kw">end</span>
|
2552
|
+
<span class="ruby-ivar">@log</span>.<span class="ruby-identifier">new_node</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@reject</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">:name</span>
|
2553
|
+
<span class="ruby-keyword kw">end</span>
|
2554
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:tester</span>].<span class="ruby-identifier">nil?</span>
|
2555
|
+
<span class="ruby-ivar">@log</span>[<span class="ruby-identifier">:tester</span>] = <span class="ruby-node">"#{@symtbl[:tester].config[:tester_name]} "</span> <span class="ruby-operator">+</span>
|
2556
|
+
<span class="ruby-node">"[#{@symtbl[:tester].config[:tester_type]}] "</span> <span class="ruby-operator">+</span>
|
2557
|
+
<span class="ruby-node">"{#{@symtbl[:tester].uri.host}:"</span> <span class="ruby-operator">+</span>
|
2558
|
+
<span class="ruby-node">"#{@symtbl[:tester].uri.port}}"</span>
|
2559
|
+
<span class="ruby-keyword kw">end</span>
|
2560
|
+
<span class="ruby-identifier">res</span>.<span class="ruby-identifier">to_ttk_log</span>(<span class="ruby-ivar">@log</span>)
|
2561
|
+
<span class="ruby-keyword kw">end</span>
|
2562
|
+
</pre>
|
2563
|
+
</div>
|
2564
|
+
</div>
|
2565
|
+
</div>
|
2566
|
+
|
2567
|
+
<div id="method-M000281" class="method-detail">
|
2568
|
+
<a name="M000281"></a>
|
2569
|
+
|
2570
|
+
<div class="method-heading">
|
2571
|
+
<a href="#M000281" class="method-signature">
|
2572
|
+
<span class="method-name">prologue</span><span class="method-args">()</span>
|
2573
|
+
</a>
|
2574
|
+
</div>
|
2575
|
+
|
2576
|
+
<div class="method-description">
|
2577
|
+
<p>
|
2578
|
+
Display test attributes. Attributes displayed and their order is specified
|
2579
|
+
by the class attribute <em>attributes</em>.
|
2580
|
+
</p>
|
2581
|
+
<p><a class="source-toggle" href="#"
|
2582
|
+
onclick="toggleCode('M000281-source');return false;">[Source]</a></p>
|
2583
|
+
<div class="method-source-code" id="M000281-source">
|
2584
|
+
<pre>
|
2585
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 386</span>
|
2586
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prologue</span>
|
2587
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:loader</span>].<span class="ruby-identifier">nil?</span>
|
2588
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'no loader in the symtbl'</span>
|
2589
|
+
<span class="ruby-keyword kw">end</span>
|
2590
|
+
<span class="ruby-ivar">@save</span> = {}
|
2591
|
+
<span class="ruby-identifier">res</span> = <span class="ruby-constant">OHash</span>.<span class="ruby-identifier">new</span>
|
2592
|
+
<span class="ruby-identifier">check_attributes</span>
|
2593
|
+
<span class="ruby-identifier">each_attribute</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">attr</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
|
2594
|
+
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">nil?</span>
|
2595
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">name</span>
|
2596
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">expand?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">new_val</span> = <span class="ruby-identifier">val</span>.<span class="ruby-identifier">symtbl_gsub</span>(<span class="ruby-ivar">@symtbl</span>)
|
2597
|
+
<span class="ruby-ivar">@save</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">val</span>
|
2598
|
+
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">new_val</span>
|
2599
|
+
<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{name}="</span>, <span class="ruby-identifier">val</span>)
|
2600
|
+
<span class="ruby-keyword kw">end</span>
|
2601
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">visible?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@reject</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">name</span>
|
2602
|
+
<span class="ruby-identifier">res</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">val</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">default</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:name</span>
|
2603
|
+
<span class="ruby-keyword kw">end</span>
|
2604
|
+
<span class="ruby-keyword kw">end</span>
|
2605
|
+
<span class="ruby-ivar">@symbols</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
2606
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>
|
2607
|
+
<span class="ruby-keyword kw">end</span>
|
2608
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@reject</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">:name</span>
|
2609
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:pathname</span>].<span class="ruby-identifier">nil?</span>
|
2610
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:pathname</span>] = (<span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">to_sym</span>
|
2611
|
+
<span class="ruby-keyword kw">else</span>
|
2612
|
+
<span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:pathname</span>] = <span class="ruby-node">"#{@symtbl[:pathname]}/#{self.name}"</span><span class="ruby-node">"#{@symtbl[:pathname]}/#{self.name}"</span>
|
2613
|
+
<span class="ruby-keyword kw">end</span>
|
2614
|
+
<span class="ruby-ivar">@log</span>.<span class="ruby-identifier">new_node</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@reject</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">:name</span>
|
2615
|
+
<span class="ruby-keyword kw">end</span>
|
2616
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@symtbl</span>[<span class="ruby-identifier">:tester</span>].<span class="ruby-identifier">nil?</span>
|
2617
|
+
<span class="ruby-ivar">@log</span>[<span class="ruby-identifier">:tester</span>] = <span class="ruby-node">"#{@symtbl[:tester].config[:tester_name]} "</span> <span class="ruby-operator">+</span>
|
2618
|
+
<span class="ruby-node">"[#{@symtbl[:tester].config[:tester_type]}] "</span> <span class="ruby-operator">+</span>
|
2619
|
+
<span class="ruby-node">"{#{@symtbl[:tester].uri.host}:"</span> <span class="ruby-operator">+</span>
|
2620
|
+
<span class="ruby-node">"#{@symtbl[:tester].uri.port}}"</span>
|
2621
|
+
<span class="ruby-keyword kw">end</span>
|
2622
|
+
<span class="ruby-identifier">res</span>.<span class="ruby-identifier">to_ttk_log</span>(<span class="ruby-ivar">@log</span>)
|
2623
|
+
<span class="ruby-keyword kw">end</span>
|
2624
|
+
</pre>
|
2625
|
+
</div>
|
2626
|
+
</div>
|
2627
|
+
</div>
|
2628
|
+
|
2629
|
+
<div id="method-M000251" class="method-detail">
|
2630
|
+
<a name="M000251"></a>
|
2631
|
+
|
2632
|
+
<div class="method-heading">
|
2633
|
+
<a href="#M000251" class="method-signature">
|
2634
|
+
<span class="method-name">raise_status</span><span class="method-args">( status )</span>
|
2635
|
+
</a>
|
2636
|
+
</div>
|
2637
|
+
|
2638
|
+
<div class="method-description">
|
2639
|
+
<p>
|
2640
|
+
Assertions
|
2641
|
+
</p>
|
2642
|
+
<p><a class="source-toggle" href="#"
|
2643
|
+
onclick="toggleCode('M000251-source');return false;">[Source]</a></p>
|
2644
|
+
<div class="method-source-code" id="M000251-source">
|
2645
|
+
<pre>
|
2646
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 488</span>
|
2647
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raise_status</span> ( <span class="ruby-identifier">status</span> )
|
2648
|
+
<span class="ruby-ivar">@thread</span>.<span class="ruby-identifier">raise</span>(<span class="ruby-identifier">status</span>)
|
2649
|
+
<span class="ruby-keyword kw">end</span>
|
2650
|
+
</pre>
|
2651
|
+
</div>
|
2652
|
+
</div>
|
2653
|
+
</div>
|
2654
|
+
|
2655
|
+
<div id="method-M000291" class="method-detail">
|
2656
|
+
<a name="M000291"></a>
|
2657
|
+
|
2658
|
+
<div class="method-heading">
|
2659
|
+
<a href="#M000291" class="method-signature">
|
2660
|
+
<span class="method-name">raise_status</span><span class="method-args">( status )</span>
|
2661
|
+
</a>
|
2662
|
+
</div>
|
2663
|
+
|
2664
|
+
<div class="method-description">
|
2665
|
+
<p>
|
2666
|
+
Assertions
|
2667
|
+
</p>
|
2668
|
+
<p><a class="source-toggle" href="#"
|
2669
|
+
onclick="toggleCode('M000291-source');return false;">[Source]</a></p>
|
2670
|
+
<div class="method-source-code" id="M000291-source">
|
2671
|
+
<pre>
|
2672
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 488</span>
|
2673
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raise_status</span> ( <span class="ruby-identifier">status</span> )
|
2674
|
+
<span class="ruby-ivar">@thread</span>.<span class="ruby-identifier">raise</span>(<span class="ruby-identifier">status</span>)
|
2675
|
+
<span class="ruby-keyword kw">end</span>
|
2676
|
+
</pre>
|
2677
|
+
</div>
|
2678
|
+
</div>
|
2679
|
+
</div>
|
2680
|
+
|
2681
|
+
<div id="method-M000252" class="method-detail">
|
2682
|
+
<a name="M000252"></a>
|
2683
|
+
|
2684
|
+
<div class="method-heading">
|
2685
|
+
<a href="#M000252" class="method-signature">
|
2686
|
+
<span class="method-name">raise_status_custom</span><span class="method-args">( status_class, *args )</span>
|
2687
|
+
</a>
|
2688
|
+
</div>
|
2689
|
+
|
2690
|
+
<div class="method-description">
|
2691
|
+
<p><a class="source-toggle" href="#"
|
2692
|
+
onclick="toggleCode('M000252-source');return false;">[Source]</a></p>
|
2693
|
+
<div class="method-source-code" id="M000252-source">
|
2694
|
+
<pre>
|
2695
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 493</span>
|
2696
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raise_status_custom</span> ( <span class="ruby-identifier">status_class</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
2697
|
+
<span class="ruby-identifier">weight</span>, <span class="ruby-identifier">message</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">partition</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Weights</span><span class="ruby-operator">::</span><span class="ruby-constant">Weight</span> }
|
2698
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">weight</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">message</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>
|
2699
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'too much arguments'</span>
|
2700
|
+
<span class="ruby-keyword kw">end</span>
|
2701
|
+
<span class="ruby-identifier">raise_status</span> <span class="ruby-identifier">status_class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">weight</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">message</span>[<span class="ruby-value">0</span>])
|
2702
|
+
<span class="ruby-keyword kw">end</span>
|
2703
|
+
</pre>
|
2704
|
+
</div>
|
2705
|
+
</div>
|
2706
|
+
</div>
|
2707
|
+
|
2708
|
+
<div id="method-M000292" class="method-detail">
|
2709
|
+
<a name="M000292"></a>
|
2710
|
+
|
2711
|
+
<div class="method-heading">
|
2712
|
+
<a href="#M000292" class="method-signature">
|
2713
|
+
<span class="method-name">raise_status_custom</span><span class="method-args">( status_class, *args )</span>
|
2714
|
+
</a>
|
2715
|
+
</div>
|
2716
|
+
|
2717
|
+
<div class="method-description">
|
2718
|
+
<p><a class="source-toggle" href="#"
|
2719
|
+
onclick="toggleCode('M000292-source');return false;">[Source]</a></p>
|
2720
|
+
<div class="method-source-code" id="M000292-source">
|
2721
|
+
<pre>
|
2722
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 493</span>
|
2723
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raise_status_custom</span> ( <span class="ruby-identifier">status_class</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
2724
|
+
<span class="ruby-identifier">weight</span>, <span class="ruby-identifier">message</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">partition</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Weights</span><span class="ruby-operator">::</span><span class="ruby-constant">Weight</span> }
|
2725
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">weight</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">message</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>
|
2726
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'too much arguments'</span>
|
2727
|
+
<span class="ruby-keyword kw">end</span>
|
2728
|
+
<span class="ruby-identifier">raise_status</span> <span class="ruby-identifier">status_class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">weight</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">message</span>[<span class="ruby-value">0</span>])
|
2729
|
+
<span class="ruby-keyword kw">end</span>
|
2730
|
+
</pre>
|
2731
|
+
</div>
|
2732
|
+
</div>
|
2733
|
+
</div>
|
2734
|
+
|
2735
|
+
<div id="method-M000282" class="method-detail">
|
2736
|
+
<a name="M000282"></a>
|
2737
|
+
|
2738
|
+
<div class="method-heading">
|
2739
|
+
<a href="#M000282" class="method-signature">
|
2740
|
+
<span class="method-name">run_impl</span><span class="method-args">()</span>
|
2741
|
+
</a>
|
2742
|
+
</div>
|
2743
|
+
|
2744
|
+
<div class="method-description">
|
2745
|
+
<p>
|
2746
|
+
Compute really the test, only this method can be time checked.
|
2747
|
+
</p>
|
2748
|
+
<p><a class="source-toggle" href="#"
|
2749
|
+
onclick="toggleCode('M000282-source');return false;">[Source]</a></p>
|
2750
|
+
<div class="method-source-code" id="M000282-source">
|
2751
|
+
<pre>
|
2752
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 428</span>
|
2753
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_impl</span>
|
2754
|
+
<span class="ruby-keyword kw">end</span>
|
2755
|
+
</pre>
|
2756
|
+
</div>
|
2757
|
+
</div>
|
2758
|
+
</div>
|
2759
|
+
|
2760
|
+
<div id="method-M000242" class="method-detail">
|
2761
|
+
<a name="M000242"></a>
|
2762
|
+
|
2763
|
+
<div class="method-heading">
|
2764
|
+
<a href="#M000242" class="method-signature">
|
2765
|
+
<span class="method-name">run_impl</span><span class="method-args">()</span>
|
2766
|
+
</a>
|
2767
|
+
</div>
|
2768
|
+
|
2769
|
+
<div class="method-description">
|
2770
|
+
<p>
|
2771
|
+
Compute really the test, only this method can be time checked.
|
2772
|
+
</p>
|
2773
|
+
<p><a class="source-toggle" href="#"
|
2774
|
+
onclick="toggleCode('M000242-source');return false;">[Source]</a></p>
|
2775
|
+
<div class="method-source-code" id="M000242-source">
|
2776
|
+
<pre>
|
2777
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 428</span>
|
2778
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_impl</span>
|
2779
|
+
<span class="ruby-keyword kw">end</span>
|
2780
|
+
</pre>
|
2781
|
+
</div>
|
2782
|
+
</div>
|
2783
|
+
</div>
|
2784
|
+
|
2785
|
+
<div id="method-M000249" class="method-detail">
|
2786
|
+
<a name="M000249"></a>
|
2787
|
+
|
2788
|
+
<div class="method-heading">
|
2789
|
+
<a href="#M000249" class="method-signature">
|
2790
|
+
<span class="method-name">skip_hook</span><span class="method-args">()</span>
|
2791
|
+
</a>
|
2792
|
+
</div>
|
2793
|
+
|
2794
|
+
<div class="method-description">
|
2795
|
+
<p>
|
2796
|
+
Here you can do some task when the test is skiped.
|
2797
|
+
</p>
|
2798
|
+
<p><a class="source-toggle" href="#"
|
2799
|
+
onclick="toggleCode('M000249-source');return false;">[Source]</a></p>
|
2800
|
+
<div class="method-source-code" id="M000249-source">
|
2801
|
+
<pre>
|
2802
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 473</span>
|
2803
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skip_hook</span>
|
2804
|
+
<span class="ruby-keyword kw">end</span>
|
2805
|
+
</pre>
|
2806
|
+
</div>
|
2807
|
+
</div>
|
2808
|
+
</div>
|
2809
|
+
|
2810
|
+
<div id="method-M000289" class="method-detail">
|
2811
|
+
<a name="M000289"></a>
|
2812
|
+
|
2813
|
+
<div class="method-heading">
|
2814
|
+
<a href="#M000289" class="method-signature">
|
2815
|
+
<span class="method-name">skip_hook</span><span class="method-args">()</span>
|
2816
|
+
</a>
|
2817
|
+
</div>
|
2818
|
+
|
2819
|
+
<div class="method-description">
|
2820
|
+
<p>
|
2821
|
+
Here you can do some task when the test is skiped.
|
2822
|
+
</p>
|
2823
|
+
<p><a class="source-toggle" href="#"
|
2824
|
+
onclick="toggleCode('M000289-source');return false;">[Source]</a></p>
|
2825
|
+
<div class="method-source-code" id="M000289-source">
|
2826
|
+
<pre>
|
2827
|
+
<span class="ruby-comment cmt"># File lib/ttk/strategies/Strategy.rb, line 473</span>
|
2828
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skip_hook</span>
|
2829
|
+
<span class="ruby-keyword kw">end</span>
|
2830
|
+
</pre>
|
2831
|
+
</div>
|
2832
|
+
</div>
|
2833
|
+
</div>
|
2834
|
+
|
2835
|
+
|
2836
|
+
</div>
|
2837
|
+
|
2838
|
+
|
2839
|
+
</div>
|
2840
|
+
|
2841
|
+
|
2842
|
+
<div id="validator-badges">
|
2843
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
2844
|
+
</div>
|
2845
|
+
|
2846
|
+
</body>
|
2847
|
+
</html>
|