@@ -33,13 +33,13 @@ type TestCaseForContestNameAndTaskIndex = {
3333type TestCasesForContestNameAndTaskIndex = TestCaseForContestNameAndTaskIndex [ ] ;
3434
3535describe ( 'Contest' , ( ) => {
36- // TODO: Add ARC and AOI.
36+ // TODO: Add AOI.
3737 describe ( 'classify contest' , ( ) => {
3838 test ( 'when contest_id is ABS' , ( ) => {
3939 expect ( classifyContest ( 'abs' ) ) . toEqual ( ContestType . ABS ) ;
4040 } ) ;
4141
42- describe ( 'when contest_id contains ABC ' , ( ) => {
42+ describe ( 'when contest_id contains abc ' , ( ) => {
4343 const testCases = [
4444 { contestId : 'abc001' , expected : ContestType . ABC } ,
4545 { contestId : 'abc002' , expected : ContestType . ABC } ,
@@ -159,6 +159,26 @@ describe('Contest', () => {
159159 } ) ;
160160 } ) ;
161161
162+ describe ( 'when contest_id means arc-like' , ( ) => {
163+ const testCases = [ { contestId : 'tenka1-2018' , expected : ContestType . ARC_LIKE } ] ;
164+
165+ runTests ( 'classifyContest' , testCases , ( { contestId, expected } : TestCaseForContestType ) => {
166+ expect ( classifyContest ( contestId ) ) . toEqual ( expected ) ;
167+ } ) ;
168+ } ) ;
169+
170+ describe ( 'when contest_id means agc-like' , ( ) => {
171+ const testCases = [
172+ { contestId : 'code-festival-2017-quala' , expected : ContestType . AGC_LIKE } ,
173+ { contestId : 'code-festival-2017-qualb' , expected : ContestType . AGC_LIKE } ,
174+ { contestId : 'code-festival-2017-qualc' , expected : ContestType . AGC_LIKE } ,
175+ ] ;
176+
177+ runTests ( 'classifyContest' , testCases , ( { contestId, expected } : TestCaseForContestType ) => {
178+ expect ( classifyContest ( contestId ) ) . toEqual ( expected ) ;
179+ } ) ;
180+ } ) ;
181+
162182 describe ( 'when contest_id contains chokudai_S' , ( ) => {
163183 const testCases = [
164184 { contestId : 'chokudai_S001' , expected : ContestType . OTHERS } ,
@@ -170,8 +190,9 @@ describe('Contest', () => {
170190 } ) ;
171191 } ) ;
172192
173- describe ( 'when contest_id contains donuts, colopl and gigacode' , ( ) => {
193+ describe ( 'when contest_id contains code-festival-2014-final, donuts, colopl and gigacode' , ( ) => {
174194 const testCases = [
195+ { contestId : 'code-festival-2014-final' , expected : ContestType . OTHERS } ,
175196 { contestId : 'donuts-live2014' , expected : ContestType . OTHERS } ,
176197 { contestId : 'donuts-2015' , expected : ContestType . OTHERS } ,
177198 { contestId : 'colopl2018-qual' , expected : ContestType . OTHERS } ,
@@ -194,11 +215,11 @@ describe('Contest', () => {
194215 } ) ;
195216
196217 describe ( 'get contest priority' , ( ) => {
197- test ( 'when contest_id is ABS ' , ( ) => {
218+ test ( 'when contest_id is abs ' , ( ) => {
198219 expect ( getContestPriority ( 'abs' ) ) . toEqual ( contestTypePriorities . get ( ContestType . ABS ) ) ;
199220 } ) ;
200221
201- describe ( 'when contest_id contains ABC ' , ( ) => {
222+ describe ( 'when contest_id contains abc ' , ( ) => {
202223 const testCases = [
203224 { contestId : 'abc001' , expected : ContestType . ABC } ,
204225 { contestId : 'abc002' , expected : ContestType . ABC } ,
@@ -346,6 +367,34 @@ describe('Contest', () => {
346367 ) ;
347368 } ) ;
348369
370+ describe ( 'when contest_id means arc-like' , ( ) => {
371+ const testCases = [ { contestId : 'tenka1-2018' , expected : ContestType . ARC_LIKE } ] ;
372+
373+ runTests (
374+ 'getContestPriority' ,
375+ testCases ,
376+ ( { contestId, expected } : TestCaseForContestType ) => {
377+ expect ( getContestPriority ( contestId ) ) . toEqual ( contestTypePriorities . get ( expected ) ) ;
378+ } ,
379+ ) ;
380+ } ) ;
381+
382+ describe ( 'when contest_id means agc-like' , ( ) => {
383+ const testCases = [
384+ { contestId : 'code-festival-2017-quala' , expected : ContestType . AGC_LIKE } ,
385+ { contestId : 'code-festival-2017-qualb' , expected : ContestType . AGC_LIKE } ,
386+ { contestId : 'code-festival-2017-qualc' , expected : ContestType . AGC_LIKE } ,
387+ ] ;
388+
389+ runTests (
390+ 'getContestPriority' ,
391+ testCases ,
392+ ( { contestId, expected } : TestCaseForContestType ) => {
393+ expect ( getContestPriority ( contestId ) ) . toEqual ( contestTypePriorities . get ( expected ) ) ;
394+ } ,
395+ ) ;
396+ } ) ;
397+
349398 describe ( 'when contest_id contains chokudai_S' , ( ) => {
350399 const testCases = [
351400 { contestId : 'chokudai_S001' , expected : ContestType . OTHERS } ,
@@ -361,8 +410,9 @@ describe('Contest', () => {
361410 ) ;
362411 } ) ;
363412
364- describe ( 'when contest_id contains donuts, colopl and gigacode' , ( ) => {
413+ describe ( 'when contest_id contains code-festival-2014-final, donuts, colopl and gigacode' , ( ) => {
365414 const testCases = [
415+ { contestId : 'code-festival-2014-final' , expected : ContestType . OTHERS } ,
366416 { contestId : 'donuts-live2014' , expected : ContestType . OTHERS } ,
367417 { contestId : 'donuts-2015' , expected : ContestType . OTHERS } ,
368418 { contestId : 'colopl2018-qual' , expected : ContestType . OTHERS } ,
@@ -405,7 +455,7 @@ describe('Contest', () => {
405455 } ) ;
406456
407457 describe ( 'get contest name label' , ( ) => {
408- describe ( 'when contest_id contains ABC ' , ( ) => {
458+ describe ( 'when contest_id contains abc ' , ( ) => {
409459 const testCases = [
410460 { contestId : 'abc001' , expected : 'ABC001' } ,
411461 { contestId : 'abc002' , expected : 'ABC002' } ,
0 commit comments