Skip to content

Commit

Permalink
WIP step 6
Browse files Browse the repository at this point in the history
Correction pour tests complets sur LearningTest
  • Loading branch information
marcboulle committed Nov 28, 2023
1 parent a0e1d7a commit d8c7089
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Learning/KWData/KWTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ Time KWTimeFormat::StringToTime(const char* const sValue) const

// On ne prend en compte que les decimales utiles de la fraction de secondes
nUnit /= 10;
if (bCheck and nUnit == 0)
if (bCheck and nUnit > 0)
nSecondFrac += nUnit * (cChar0 - '0');
else
break;
Expand Down Expand Up @@ -621,7 +621,7 @@ Time KWTimeFormat::StringToTime(const char* const sValue) const

// On ne prend en compte que les decimales utiles de la fraction de secondes
nUnit /= 10;
if (bCheck and nUnit == 0)
if (bCheck and nUnit > 0)
nSecondFrac += nUnit * (cChar0 - '0');
else
break;
Expand Down
4 changes: 4 additions & 0 deletions src/Learning/KWData/KWTimestamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ void Timestamp::Test()
int nTotalLeapDayNumber;
int nTotalSecondNumber;

//DDD
tsCurrent.Init(2012, 01, 01, 21, 38, 20.3);
cout << "BUG: " << tsCurrent.ToString() << endl;

cout << "sizeof(Timestamp): " << sizeof(Timestamp) << endl;
//DDD assert(sizeof(Timestamp) == sizeof(Date) + sizeof(Time));
assert(sizeof(Timestamp) == sizeof(longint));
Expand Down
2 changes: 1 addition & 1 deletion src/Learning/MODL/MODL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main(int argc, char** argv)
// Choix du repertoire de lancement pour le debugage sous Windows (a commenter apres fin du debug)
// SetWindowsDebugDir("Standard", "IrisLight");
// SetWindowsDebugDir("Standard", "Iris2D");
SetWindowsDebugDir("Rules", "DateTimeRules");
SetWindowsDebugDir("z_Work", "TimestampBUG");

// Parametrage des logs memoires depuis les variables d'environnement, pris en compte dans KWLearningProject
// KhiopsMemStatsLogFileName, KhiopsMemStatsLogFrequency, KhiopsMemStatsLogToCollect
Expand Down

0 comments on commit d8c7089

Please sign in to comment.