Skip to content

Commit

Permalink
Making tests green
Browse files Browse the repository at this point in the history
  • Loading branch information
foralost committed Feb 25, 2024
1 parent 87f51d8 commit 2e29c6d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 27 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.

cd "$(dirname "$0")" || exit

ANDROID_HOME="/home/foralost/Android/Sdk"
ADB="${ANDROID_HOME}/platform-tools/adb"
ANDROID_OUTPUTS_DIR="uhabits-android/build/outputs"
AVDMANAGER="${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
2015-01-25,2
2015-01-24,0
2015-01-23,1
2015-01-22,2
2015-01-21,2
2015-01-20,2
2015-01-19,1
2015-01-18,1
2015-01-17,2
2015-01-16,2
2015-01-25,YES_MANUAL
2015-01-24,NO
2015-01-23,YES_AUTO
2015-01-22,YES_MANUAL
2015-01-21,YES_MANUAL
2015-01-20,YES_MANUAL
2015-01-19,YES_AUTO
2015-01-18,YES_AUTO
2015-01-17,YES_MANUAL
2015-01-16,YES_MANUAL
20 changes: 10 additions & 10 deletions uhabits-core/assets/test/csv_export/Checkmarks.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Date,Meditate,Wake up early,
2015-01-25,-1,2,
2015-01-24,-1,0,
2015-01-23,-1,1,
2015-01-22,-1,2,
2015-01-21,-1,2,
2015-01-20,-1,2,
2015-01-19,-1,1,
2015-01-18,-1,1,
2015-01-17,-1,2,
2015-01-16,-1,2,
2015-01-25,UNKNOWN,YES_MANUAL,
2015-01-24,UNKNOWN,NO,
2015-01-23,UNKNOWN,YES_AUTO,
2015-01-22,UNKNOWN,YES_MANUAL,
2015-01-21,UNKNOWN,YES_MANUAL,
2015-01-20,UNKNOWN,YES_MANUAL,
2015-01-19,UNKNOWN,YES_AUTO,
2015-01-18,UNKNOWN,YES_AUTO,
2015-01-17,UNKNOWN,YES_MANUAL,
2015-01-16,UNKNOWN,YES_MANUAL,
6 changes: 3 additions & 3 deletions uhabits-core/assets/test/csv_export/Habits.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Position,Name,Question,Description,NumRepetitions,Interval,Color
001,Meditate,Did you meditate this morning?,,1,1,#FF8F00
002,Wake up early,Did you wake up before 6am?,,2,3,#00897B
Position,Name,Question,Description,NumRepetitions,Interval,Color,Unit,Target Type,Target Value
001,Meditate,Did you meditate this morning?,,1,1,#FF8F00,,AT_LEAST,0.0
002,Wake up early,Did you wake up before 6am?,,2,3,#00897B,,AT_LEAST,0.0
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ class HabitsCSVExporterTest : BaseUnitTest() {
file.deleteOnExit()
copyAssetToFile(assetFilename, file)

println(file.path)
println(assetFilename)

assertTrue(
FileUtils.contentEquals(
file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ class HabitListTest : BaseUnitTest() {
list.add(h2)
val expectedCSV =
"""
Position,Name,Question,Description,NumRepetitions,Interval,Color
001,Meditate,Did you meditate this morning?,this is a test description,1,1,#FF8F00
002,Wake up early,Did you wake up before 6am?,,2,3,#AFB42B
Position,Name,Question,Description,NumRepetitions,Interval,Color,Unit,Target Type,Target Value
001,Meditate,Did you meditate this morning?,this is a test description,1,1,#FF8F00,,AT_LEAST,0.0
002,Wake up early,Did you wake up before 6am?,,2,3,#AFB42B,,AT_LEAST,0.0
""".trimIndent()
val writer = StringWriter()
Expand Down

0 comments on commit 2e29c6d

Please sign in to comment.