mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-14 00:12:06 +01:00
Add dummy tests for hsregex module to fix jacoco
This commit is contained in:
parent
21f8ba8ccf
commit
766af27b02
2 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,24 @@
|
|||
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.pgpainless.algorithm;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class HSRegexInterpreterFactoryTest {
|
||||
|
||||
@Test
|
||||
public void dummyRegexTest() {
|
||||
HSRegexInterpreterFactory factory = new HSRegexInterpreterFactory();
|
||||
RegexInterpreterFactory.setInstance(factory);
|
||||
Regex regex = RegexInterpreterFactory.create("Alice|Bob");
|
||||
|
||||
assertTrue(regex.matches("Alice"));
|
||||
assertTrue(regex.matches("Bob"));
|
||||
assertFalse(regex.matches("Charlie"));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/**
|
||||
* Regex interpreter implementation based on Henry Spencers Regular Expression library.
|
||||
*
|
||||
* @see <a href="https://www.rfc-editor.org/rfc/rfc4880#section-8">RFC4880 - §8. Regular Expressions</a>
|
||||
*/
|
||||
package org.pgpainless.algorithm;
|
Loading…
Reference in a new issue