ShatteredSoftware / ShatteredCore

Core plugin for ShatteredSuite.
MIT License
2 stars 3 forks source link

Code Coverage - Vector2 #21

Closed hardiksachan closed 3 years ago

hardiksachan commented 3 years ago

RE: #20

Hey, I would like to write unit tests for Vector2. If that's okay, please assign me this issue.

hhenrichsen commented 3 years ago

Thanks for taking this! Be sure to look at the existing test structure and follow along with that; it's not too complex.

hardiksachan commented 3 years ago

Yeah sure, I'll follow the existing test structure.

hardiksachan commented 3 years ago

Hey @hhenrichsen, I am finding some issues in Vector2 like these:

    fun magnitude(): T {
        return with(context) {
            squareRoot(magnitude()) // This should be squareMagnitude()
        }
    }

which I have fixed in my local copy. Should I include them in the PR?

hhenrichsen commented 3 years ago

Yeah, go for it. Part of why I'm doing testing for these is to catch things like this. Thanks for fixing those!

hardiksachan commented 3 years ago

Alright, I'll fix them. And make the PR as soon as I am done

hardiksachan commented 3 years ago

I have raised a PR, please take a look.