1
0

Test standardize

This commit is contained in:
Jon Michael Aanes 2025-02-27 14:51:21 +01:00
parent f941882e35
commit 31f6f191b5

35
test/test_standardize.py Normal file
View File

@ -0,0 +1,35 @@
from standardize_test_format import standardize_java_text
INPUT_1 = """
@Test
@DisplayName("Invocations fail with callers without required permissions")
public void selectInvocationWithoutPermission() { }
"""
OUTPUT_1 = """
@Test
@DisplayName("Invocations fail with callers without required permissions")
public void selectInvocationWithoutPermission() { }
"""
INPUT_2 = """
/** Invocations fail with callers without required permissions. */
@Test
public void selectInvocationWithoutPermission() { }
"""
OUTPUT_2 = """
@Test
@DisplayName("Invocations fail with callers without required permissions")
public void selectInvocationWithoutPermission() { }
"""
def test_1():
assert standardize_java_text(INPUT_1) == OUTPUT_1
def test_2():
assert standardize_java_text(INPUT_2) == OUTPUT_2