Skip to content

Commit

Permalink
доп.тесты на
Browse files Browse the repository at this point in the history
- значения по умолчанию
- условия
- тернарный оператор
  • Loading branch information
artbear committed Dec 17, 2023
1 parent 6d21f39 commit f9d0f3f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void test() {

List<Diagnostic> diagnostics = getDiagnostics();

assertThat(diagnostics).hasSize(13);
assertThat(diagnostics).hasSize(18);
assertThat(diagnostics, true)
.hasRange(11, 12, 22)
.hasRange(12, 12, 28)
Expand All @@ -53,8 +53,12 @@ void test() {
.hasRange(28, 19, 35)
.hasRange(29, 10, 26)
.hasRange(29, 29, 39)
.hasRange(31, 64, 80);

.hasRange(31, 64, 80)
.hasRange(58, 17, 27)
.hasRange(58, 29, 45)
.hasRange(58, 47, 63)
.hasRange(60, 19, 29)
.hasRange(65, 22, 32);
}

@Test
Expand All @@ -66,13 +70,17 @@ void testConfigure() {

List<Diagnostic> diagnostics = getDiagnostics();

assertThat(diagnostics).hasSize(6);
assertThat(diagnostics).hasSize(10);
assertThat(diagnostics, true)
.hasRange(12, 12, 28)
.hasRange(13, 7, 17)
.hasRange(23, 7, 26)
.hasRange(27, 22, 32)
.hasRange(29, 29, 39)
.hasRange(31, 64, 80);
.hasRange(31, 64, 80)
.hasRange(58, 17, 27)
.hasRange(58, 29, 45)
.hasRange(58, 47, 63)
.hasRange(65, 22, 32);
}
}
12 changes: 8 additions & 4 deletions src/test/resources/diagnostics/MagicDateDiagnostic.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@
КодыКЛАДР.Регион = Лев(КодКЛАДР, 2) + "00000000000";
КодыКЛАДР.Район = Лев(КодКЛАДР, 5) + "00000000";

//'39990202'
//'39991231235959'
//'39990101000000'
Значение = ?= '39990202', '39991231235959', '39990101000000');

КонецПроцедуры
Если Сейчас < Дата("12340101") Тогда
КонецЕсли;

КонецПроцедуры

Функция Метод(Дата1 = '39990202')
КонецФункции

0 comments on commit f9d0f3f

Please sign in to comment.