Skip to content

lucproglangclassroom/project-1b-dynamic-word-cloud-team-3-1

 
 

Repository files navigation

Open in Codespaces

hello-scalatest-scala

Small project to get started with Scala and ScalaTest.

Running the main program

$ sbt "run -c 3 -l 2 -w 5 -s 2 -f 1"

Result:

a b c
aa bb cc 
aa bb aa bb
aa: 2 bb: 2 cc: 1
a b c
aa aa aa
aa: 3 bb: 2
aa: 4 bb: 1

Running the tests

$ sbt test

or

$ sbt coverage test coverageReport

to see the code coverage percentages of your test suite.

Result:

[info] Statement coverage.: 24.60%
[info] Branch coverage....: 52.63%

Running successive tasks with sbt

To speed up the edit-compile-test/run cycle, you can start sbt without arguments

$ sbt 

and repeatedly run individual tasks

sbt> run -c 3 -l 2 -w 5 -s 2 -f 1
sbt> test

To exit sbt, enter

sbt> exit

Running outside of sbt

This lets you use your application on the command-line.

First, create the startup script:

sbt stage

Then run outside of sbt like this:

./target/universal/stage/bin/hello-scalatest-scala

or you can run it by passing the a .txt file to read from it. This command will use the default parameters.

./target/universal/stage/bin/scalatest < lesmisrables01unkngoog_djvu.txt

Add the ignore file to it.

./target/universal/stage/bin/scalatest -i ignore.txt < lesmisrables01unkngoog_djvu.txt

On Windows, you might need backslashes. WSL (Windows Subsystem for Linux) recommended instead.

Video Visualization: Link: https://loyolauniversitychicago-my.sharepoint.com/:v:/g/personal/mnazari_luc_edu/EQ0o-edIZMFBj-X6NL0hiaYBKzaC1V-9yWjg-YdO7Exuug?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=XzSCay

About

comp-371-471-f24-project-1b-dynamic-word-cloud-hello-scalatest-scala created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%