Ver Fonte

--temposynctest: no local named near (a macro of windows.h; the Windows build failed)

Ka1-S há 5 dias atrás
pai
commit
f48b885add
1 ficheiros alterados com 5 adições e 5 exclusões
  1. 5 5
      src/engine/HostingTests.cpp

+ 5 - 5
src/engine/HostingTests.cpp

@@ -1179,7 +1179,7 @@ int runTempoSyncTest (const juce::StringArray& pluginPaths, const juce::String&
     };
     constexpr double rate = 44100.0;
     const auto logFile = juce::File (reportPath).getSiblingFile (juce::File (reportPath).getFileNameWithoutExtension() + "-plugin.txt");
-    const auto near = [] (double a, double b) { return std::abs (a - b) < 0.01; };
+    const auto sameTempo = [] (double a, double b) { return std::abs (a - b) < 0.01; };
 
     for (const auto& path : pluginPaths)
         for (const auto separate : { false, true })
@@ -1211,7 +1211,7 @@ int runTempoSyncTest (const juce::StringArray& pluginPaths, const juce::String&
                         tempo = parts[1] == "none" ? -1.0 : parts[1].getDoubleValue();
                     else if (kind == Kind::vst3Log && parts.size() >= 7 && parts[0].startsWith ("P") && parts[3] == "1")
                         tempo = parts[6].getDoubleValue();
-                    if (tempo > -2.0 && (seen.tempi.empty() || ! near (seen.tempi.back(), tempo)))
+                    if (tempo > -2.0 && (seen.tempi.empty() || ! sameTempo (seen.tempi.back(), tempo)))
                         seen.tempi.push_back (tempo);
                 }
                 if (! seen.tempi.empty())
@@ -1415,8 +1415,8 @@ int runTempoSyncTest (const juce::StringArray& pluginPaths, const juce::String&
                     series << juce::String (t, 2) << " ";
                 report << "     " << tag << ": before bar 3 " << juce::String (before, 2) << ", after " << juce::String (after, 2)
                        << (series.isNotEmpty() ? ", log " + series : juce::String()) << "\n";
-                check (near (before, 90.0), tag + ": 90 BPM reaches the plugin");
-                check (near (after, 150.0), tag + ": the tempo automation (150 BPM from bar 3) reaches it");
+                check (sameTempo (before, 90.0), tag + ": 90 BPM reaches the plugin");
+                check (sameTempo (after, 150.0), tag + ": the tempo automation (150 BPM from bar 3) reaches it");
             }
             // 2. the song's tempo changed between two renders (the same engine and plugin)
             {
@@ -1458,7 +1458,7 @@ int runTempoSyncTest (const juce::StringArray& pluginPaths, const juce::String&
                 clearLogs();
                 const auto second = renderAndRead();
                 report << "     " << tag << ": song at 90 BPM " << juce::String (first, 2) << ", changed to 120 BPM " << juce::String (second, 2) << "\n";
-                check (near (first, 90.0) && near (second, 120.0), tag + ": a tempo change reaches it (no stale tempo)");
+                check (sameTempo (first, 90.0) && sameTempo (second, 120.0), tag + ": a tempo change reaches it (no stale tempo)");
             }
         }
     setEnv ("LYNX_TEST_EXT_LOG", {});