Skip to content

Commit

Permalink
Add isolation warning tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LakshanWeerasinghe committed Dec 12, 2023
1 parent f056843 commit 23f4077
Show file tree
Hide file tree
Showing 2 changed files with 590 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,136 @@ public void testIsolationWarnings() {
int i = 0;
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 26, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 30, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 43, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 47, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 62, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 66, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 79, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 83, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 101, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 105, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 118, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 122, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 137, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 141, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 154, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 158, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 176, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 180, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 193, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 197, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 211, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 215, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 228, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 232, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 39, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 43, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 47, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 51, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 55, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 59, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 63, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 67, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 71, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 79, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 83, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 93, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 97, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 101, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 105, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 109, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 113, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 117, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 121, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 125, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 134, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 138, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 146, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 150, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 154, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 158, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 162, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 166, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 170, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 174, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 178, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 187, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 191, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 201, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 205, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 209, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 213, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 217, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 221, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 225, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 229, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 233, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 245, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 249, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 258, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 262, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 266, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 270, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 274, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 278, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 282, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 286, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 290, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 298, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 302, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 312, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 316, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 320, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 324, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 328, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 332, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 336, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 340, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 344, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 353, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 357, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 365, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 369, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 373, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 377, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 381, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 385, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 389, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 393, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 397, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 406, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 410, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 420, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 424, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 428, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 432, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 436, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 440, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 444, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 448, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 452, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 464, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 468, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 477, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 481, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 485, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 489, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 493, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 497, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 501, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 505, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 509, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 517, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 521, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 531, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 535, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 539, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 543, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 547, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 551, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 555, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 559, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 563, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 571, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 575, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 583, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 587, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 591, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 595, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 599, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 603, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 607, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 611, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 615, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 624, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 628, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 638, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 642, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 646, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 650, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 654, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 658, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 662, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 666, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 670, 5);
assertEquals(result.getHintCount(), i);

LineRange lineRange = result.getDiagnostics()[0].location().lineRange();
Expand Down
Loading

0 comments on commit 23f4077

Please sign in to comment.