Change the narration: The teacher says, "If you work hard, you will pass the test".
Change the narration: The teacher says, "If you work hard, you will pass the test".
Explanation
The teacher says that if you work hard, you will pass the test.
The reporting verb "says" is in the present tense, so no tense change is needed.
Quoted speech becomes indirect: "you" remains "you" as it's a general statement.