Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Vilkina
Copy link
Contributor

@Vilkina Vilkina commented Jul 11, 2019

No description provided.

@jdegoes
Copy link
Member

jdegoes commented Jul 11, 2019

@Vilkina Looks superb!

Just one small change: in order to run the tests, they must be in the specification, which is a string at the beginning of a class (this is because we use Specs2 for running tests, and this is the format it requires).

So at the beginning of ChunkSpec.scala, you can see:

def is: SpecStructure =
    "ChunkSpec".title ^
      s2"""
  chunk apply $apply
  chunk length $length
  chunk equality prop $equality
  chunk inequality $inequality
  flatMap chunk $flatMap
  map chunk $map
  materialize chunk $materialize
  foldLeft chunk $foldLeft
  filter chunk $filter
  drop chunk $drop
  take chunk $take
  dropWhile chunk $dropWhile
  takeWhile chunk $takeWhile
  toArray $toArray
  foreach $foreach
  concat chunk $concat
  An Array-based chunk that is filtered empty and mapped must not throw NPEs. $nullArrayBug
  toArray on concat of a slice must work properly. $toArrayOnConcatOfSlice
  toArray on concat of empty and integers must work properly. $toArrayOnConcatOfEmptyAndInts
  Chunk.filter that results in an empty Chunk must use Chunk.empty $filterConstFalseResultsInEmptyChunk
    """

You can add a line in the "spec string" for each test, something like:

Chunk reflexivity $testReflexivity
...

etc. Then run testOnly *ChunkSpec* from sbt, to confirm the tests are being run.

Then we'll be ready to merge!

@Vilkina
Copy link
Contributor Author

Vilkina commented Jul 11, 2019

Screen Shot 2019-07-11 at 4 52 33 PM

@jdegoes jdegoes merged commit 9dc6498 into zio:master Jul 11, 2019
@jdegoes
Copy link
Member

jdegoes commented Jul 11, 2019

@Vilkina Thank you for the contribution! 🎉

giphy

@Vilkina
Copy link
Contributor Author

Vilkina commented Jul 11, 2019

@jdegoes, looking forward for next ticket)

@jdegoes
Copy link
Member

jdegoes commented Jul 11, 2019

@Vilkina How about this one? 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants