Skip to content

Commit

Permalink
Compare size rather than empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
tonihele committed Sep 22, 2024
1 parent c3e8791 commit 2e05800
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions jme3-core/src/test/java/com/jme3/shader/GLSLPreprocessorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,17 @@
*/
package com.jme3.shader;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import com.jme3.asset.AssetInfo;
import com.jme3.asset.AssetKey;
import com.jme3.system.TestUtil;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;

import com.jme3.asset.AssetInfo;
import com.jme3.asset.AssetKey;
import com.jme3.system.TestUtil;

import org.junit.Test;

import jme3tools.shader.Preprocessor;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;


public class GLSLPreprocessorTest {
Expand All @@ -56,7 +52,9 @@ String readAllAsString(InputStream is) throws Exception{
while (true) {
String l = reader.readLine();
if (l == null) break;
if (output.toString() != "") output.append("\n");
if (output.length() > 0) {
output.append("\n");
}
output.append(l);
}
reader.close();
Expand Down

0 comments on commit 2e05800

Please sign in to comment.