Skip to content

Commit

Permalink
CharCheckerTest en cours
Browse files Browse the repository at this point in the history
  • Loading branch information
E211439A authored and E211439A committed Jan 12, 2024
1 parent bcae87c commit d039429
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .idea/sonarlint/issuestore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .idea/sonarlint/securityhotspotstore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package fr.medicapp.medicapp.ai.tokenization

import fr.medicapp.medicapp.tokenization.CharChecker
import org.junit.Test

class CharCheckerTest {

@Test
fun `test CharChecker isInvalid with valid char`() {
assert(!CharChecker.isInvalid('a'))
}

@Test
fun `test CharChecker isInvalid with void char`() {
assert(CharChecker.isInvalid(Char(0)))
}

@Test
fun `test CharChecker isInvalid with invalid char`() {
val char = Char(0xfffd)
assert(CharChecker.isInvalid(char))
}

@Test
fun `test isPunctuation point`() {
assert(CharChecker.isPunctuation('.'))
}

@Test
fun `test isPunctuation dash`() {
assert(CharChecker.isPunctuation('-'))
}

}

0 comments on commit d039429

Please sign in to comment.