This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. There's following bug states diagram: | |
https://uploads.toptal.io/blog/image/127559/toptal-blog-image-1542202441615-6caf28860dc45bca5f94f6bf72376a33.png | |
Restrictions: | |
- If the ticket in state Reopened has been Closed, it can only be restored to the same state Reopened. | |
- If the ticket in state In progress has been Closed, it can only be restored to the same state In progress. | |
Task: starting from Reopened, what is the number of 0-switch transitions and what is the number of allowed 1-switch transitions? Write them down. | |
2. Write tests to achieve 100% of coverage for following types of coverage: statement, decision , condition, decision/condition, multiple condition coverage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id: bfc54885f6617a81b35939f12f0a9f02199bb6d8 $ | |
# Maintainer: Ido Rosen <ido@kernel.org> | |
# Contributor: Sébastien "Seblu" Luttringer | |
# Contributor: Marcel Wysocki <maci@satgnu.net> | |
# Contributor: Daniel YC Lin <dlin.tw@gmail> | |
# Contributor: Joerg <joerg@higgsboson.tk> | |
# Contributor: Vincent Aranega <vincent.aranega@gmail.com> | |
# | |
# NOTE: To request changes to this package, please submit a pull request | |
# to the GitHub repository at https://github.com/ido/packages-archlinux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.cached_deliveries | |
if File.exists?(DELIVERIES_CACHE_PATH) == false || File.zero?(DELIVERIES_CACHE_PATH) == true | |
return [] | |
else | |
File.open(DELIVERIES_CACHE_PATH,'r') do |f| | |
Marshal.load(f) | |
end | |
end | |
end |