Skip to content

Commit

Permalink
Update testing-custom-queries.md (github#26278)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
  • Loading branch information
nicholas-keers and subatoi authored Jun 30, 2023
1 parent ce88918 commit 7fc7867
Showing 1 changed file with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,25 +157,23 @@ which is declared as a dependency for `my-query-tests`. Therefore, `EmptyThen.ql

1. Create a code snippet to test. The following Java code contains an empty `if` statement on the third line. Save it in `custom-queries/java/tests/EmptyThen/Test.java`.

```java

class Test {
public void problem(String arg) {
if (arg.isEmpty())
;
{
System.out.println("Empty argument");
```java
class Test {
public void problem(String arg) {
if (arg.isEmpty())
;
{
System.out.println("Empty argument");
}
}
}

public void good(String arg) {
if (arg.isEmpty()) {
System.out.println("Empty argument");

public void good(String arg) {
if (arg.isEmpty()) {
System.out.println("Empty argument");
}
}
}
}

```
```

### Execute the test

Expand Down

0 comments on commit 7fc7867

Please sign in to comment.