nus-cs2103-AY2021S2 / forum

10 stars 0 forks source link

test.iml created but no java folder ?! #47

Open rajobasu opened 3 years ago

rajobasu commented 3 years ago
Screenshot 2021-01-26 at 1 54 41 AM

I followed these, but this only created a test.iml file inside the /test folder. No test/java folder.

<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
  <component name="NewModuleRootManager" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$MODULE_DIR$" />
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>

This is the code. So then I just created a new java folder inside the test directory and marked it as source for testing and changed the forTests to “true”. Is this sufficient?

Also what all does the test.iml file signify?

tjtanjin commented 3 years ago

From the first line of the instruction, it says to create the folder [project_name]\src\test\java\. This would imply the java folder is supposed to be created manually which you have already done. I did not actually change anything inside the test.iml file although more on what the file is about is explained here.

rajobasu commented 3 years ago

I thought forTests should be true since we are using the module for UnitTesting?

tjtanjin commented 3 years ago

There are surprisingly little resources explaining the contents of a .iml file, specifically for orderEntry. I just left it alone because I didn't think it was important xD

damithc commented 3 years ago

Normally, you don't need to bother with the .iml file. It's updated by the IDE automatically.