File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed
jbbp/src/test/java/com/igormaznitsa/jbbp/compiler Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -608,17 +608,36 @@ public void testCompile_FixedStructArray() throws Exception {
608608 }
609609
610610 @ Test
611- public void testCompile_ErrorForNamedReset () throws Exception {
611+ public void testCompile_correctFieldName () throws Exception {
612+ JBBPCompiler .compile ("int a;int _a;int a11;int a_f;int a_1;" );
612613 assertThrows (JBBPCompilationException .class , new Executable () {
613614 @ Override
614615 public void execute () throws Throwable {
615- JBBPCompiler .compile ("reset$$ hello ;" );
616+ JBBPCompiler .compile ("int 1a ;" );
616617 }
617618 });
618619 }
619620
620621 @ Test
621- public void testCompile_ErrorForArrayReset () throws Exception {
622+ public void testCompile_ErrorForNonAllowedArguments () throws Exception {
623+ assertThrows (JBBPCompilationException .class , new Executable () {
624+ @ Override
625+ public void execute () throws Throwable {
626+ JBBPCompiler .compile ("reset$$:1;" );
627+ }
628+ });
629+ assertThrows (JBBPCompilationException .class , new Executable () {
630+ @ Override
631+ public void execute () throws Throwable {
632+ JBBPCompiler .compile ("reset$$ hello;" );
633+ }
634+ });
635+ assertThrows (JBBPCompilationException .class , new Executable () {
636+ @ Override
637+ public void execute () throws Throwable {
638+ JBBPCompiler .compile ("reset$$ [445];" );
639+ }
640+ });
622641 assertThrows (JBBPCompilationException .class , new Executable () {
623642 @ Override
624643 public void execute () throws Throwable {
You can’t perform that action at this time.
0 commit comments