尝试解决插件bug

This commit is contained in:
2026-01-10 18:56:58 +08:00
parent e37972b227
commit 4d393f3d23
24 changed files with 959 additions and 161 deletions
+24
View File
@@ -0,0 +1,24 @@
#include <gtest/gtest.h>
#include "ofxParam.h"
#include "ofxhParam.h"
#include "pluginSupport/paraminstance.h"
TEST(PluginSupportParam, IntegerInstanceNullNodeRoundTrip)
{
OFX::Host::Param::Descriptor descriptor(kOfxParamTypeInteger,
"TestInteger");
olive::plugin::IntegerInstance instance(nullptr, descriptor);
int value = -1;
EXPECT_EQ(instance.get(value), kOfxStatOK);
EXPECT_EQ(value, 0);
EXPECT_EQ(instance.set(7), kOfxStatOK);
EXPECT_EQ(instance.get(value), kOfxStatOK);
EXPECT_EQ(value, 7);
int time_value = -1;
EXPECT_EQ(instance.get(1.0, time_value), kOfxStatOK);
EXPECT_EQ(time_value, 7);
}