COMP1511 17s2
— extension lecture —
testing + version control
Jashank Jeremy
<jashank.jeremy@unsw.edu.au>
Jashank Jeremy
<jashank.jeremy@unsw.edu.au>
know your scope
what are we allowed to check?
what aren’t we allowed to check?
construct scenarios
consider edge-cases, boundaries
“attack first”…
think before you test
test before you implement
know or construct
a world to test in
ensure you have information
… as much as possible!
test one thing only
check the world is as you left it…
check pointers, check values, check structure
use what you know to test effectively
testing listDeleteTail
how are you sharing code?
USB flash drives
e-mail threads
google docs
… or worse
someone’s responsible
for making sure
all the pieces of
Game.c, testGame.c, etc.
fit together…
… but code isn’t like an essay
there must be a better way!
… and there is:
sometimes referred to as
“revision control systems” or
“version control systems”
create files, directories
take a snapshot of your state
retrieve, compare, examine old snapshots
track contributors and contributions
share and integrate code
like most things in computing, many options
… all pretty much the same
distributed
Git
Mercurial (Hg)
Bazaar (Bzr)
darcs
pijul
centralised
Subversion (svn)
CVS
RCS
SCCS
… and many commercial offerings
Perforce, ClearCase, TFS
Atlassian Bitbucket (bitbucket.org)
free private Git (+ Hg) repositories
Github (github.com)
free (for students)
private Git repositories
GitLab (gitlab.com)
free private Git repositories
hosted at CSE: gitlab.cse.unsw.edu.au
the Git command-line …
a great demo at try.github.io
magit
better Emacs integration
tig
terminal-flavoured interactions
gitg, gitk, git gui
simple Git GUIs
Atlassian SourceTree
sourcetreeapp.com
Github for Desktop
desktop.github.com
syntevo SmartGit
syntevo.com/smartgit
TortoiseGit
tortoisegit.org
integrated into editors and IDEs
Sublime, Atom, VSC…
Xcode, VS 2015, Eclipse, IntelliJ