Skip to content

Commit b0646fa

Browse files
committed
Add note
1 parent e8ce22d commit b0646fa

4 files changed

Lines changed: 25 additions & 7 deletions

File tree

apps/landing/src/components/test-case/list/TestCaseList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { TestCaseDisplayBoundary } from '../TestCaseDisplayBoundary'
99
export function TestCaseList({ results }: { results: TestStatus[2] }) {
1010
return (
1111
<Grid gap="8px" gridTemplateColumns="repeat(auto-fill, minmax(16px, 1fr))">
12-
{results.map(([text, expected, actual, isSuccess], idx) => {
12+
{results.map(([text, note, expected, actual, isSuccess], idx) => {
1313
const textParts = parseTextWithLaTeX(text)
1414

1515
return (
@@ -28,6 +28,7 @@ export function TestCaseList({ results }: { results: TestStatus[2] }) {
2828
<span key={partIdx}>{part.content}</span>
2929
),
3030
)}
31+
{note ? ` (${note})` : null}
3132
<br />
3233
정답 : <Text wordBreak="break-all">{expected}</Text>
3334
<br />

apps/landing/src/components/test-case/table/TestCaseTable.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function TestCaseTable({ results }: { results: TestStatus[2] }) {
2121
</Tr>
2222
</Thead>
2323
<Tbody>
24-
{results.map(([text, expected, actual, isSuccess], index) => (
24+
{results.map(([text, note, expected, actual, isSuccess], index) => (
2525
<TestCaseDisplayBoundary
2626
key={index}
2727
option="failedOnly"
@@ -36,7 +36,10 @@ export function TestCaseTable({ results }: { results: TestStatus[2] }) {
3636
data-responsive="desktop"
3737
>
3838
<Td>{index + 1}</Td>
39-
<Td>{text}</Td>
39+
<Td>
40+
{text}
41+
{note ? ` (${note})` : null}
42+
</Td>
4043
<Td>{expected}</Td>
4144
<Td>{actual}</Td>
4245
<Td
@@ -88,7 +91,10 @@ export function TestCaseTable({ results }: { results: TestStatus[2] }) {
8891
</Flex>
8992
<Flex alignItems="center" gap="10px" px="10px">
9093
<Text typography="bodyBold">예문</Text>
91-
<Text>{text}</Text>
94+
<Text>
95+
{text}
96+
{note ? ` (${note})` : null}
97+
</Text>
9298
</Flex>
9399
<Flex alignItems="center" gap="10px" px="10px">
94100
<Text typography="bodyBold">정답</Text>

apps/landing/src/types/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ export type Merge<T, U> = Omit<T, Extract<keyof T, keyof U>> & U
33
export type TestStatus = [
44
success: number,
55
fail: number,
6-
Array<[text: string, expected: string, actual: string, isSuccess: boolean]>,
6+
Array<
7+
[
8+
text: string,
9+
note: string,
10+
expected: string,
11+
actual: string,
12+
isSuccess: boolean,
13+
]
14+
>,
715
]
816

917
export type TestStatusMap = Record<string, TestStatus>

libs/braillify/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,8 @@ mod test {
599599

600600
let mut file_total = 0;
601601
let mut file_failed = 0;
602-
// input, expected, actual, is_success
603-
let mut test_status: Vec<(String, String, String, bool)> = Vec::new();
602+
// input, note, expected, actual, is_success
603+
let mut test_status: Vec<(String, String, String, String, bool)> = Vec::new();
604604

605605
for (line_num, record) in records.iter().enumerate() {
606606
total += 1;
@@ -611,6 +611,7 @@ mod test {
611611
line_num, filename
612612
)
613613
});
614+
let note = record["note"].as_str().unwrap_or("").to_string();
614615
// 테스트 케이스 파일의 숫자 코드에서 앞뒤 공백 제거 후 비교
615616
let expected = record["expected"]
616617
.as_str()
@@ -668,6 +669,7 @@ mod test {
668669

669670
test_status.push((
670671
input.to_string(),
672+
note.clone(),
671673
unicode_braille.to_string(),
672674
braille_expected.clone(),
673675
if has_formatting_case {
@@ -702,6 +704,7 @@ mod test {
702704

703705
test_status.push((
704706
input.to_string(),
707+
note.clone(),
705708
unicode_braille.to_string(),
706709
e.to_string(),
707710
false,

0 commit comments

Comments
 (0)