Re-enable catalyst app for android

Summary: Re-enables the disabled codegens on android by renaming the test fixtures to something shorter

Reviewed By: TheSavior

Differential Revision: D14258414

fbshipit-source-id: 912c12df039930ec492b5bafc69bc298f913bdcc
This commit is contained in:
Rick Hanlon
2019-03-02 12:52:45 -08:00
committed by Facebook Github Bot
parent 85d343d056
commit ba0b52f750
12 changed files with 159 additions and 192 deletions

View File

@@ -44,35 +44,35 @@ fb_native.sh_binary(
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_BOOLEAN_PROP",
fixture_name = "BOOLEAN_PROP",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_STRING_PROP",
fixture_name = "STRING_PROP",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_INTEGER_PROPS",
fixture_name = "INTEGER_PROPS",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_FLOAT_PROPS",
fixture_name = "FLOAT_PROPS",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_COLOR_PROP",
fixture_name = "COLOR_PROP",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_ENUM_PROP",
fixture_name = "ENUM_PROP",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_EVENT_PROPS",
fixture_name = "EVENT_PROPS",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS",
fixture_name = "EVENT_NESTED_OBJECT_PROPS",
)
rn_codegen_test(
@@ -99,14 +99,14 @@ fb_xplat_cxx_binary(
],
visibility = ["PUBLIC"],
deps = [
":generated_components-SINGLE_COMPONENT_WITH_BOOLEAN_PROP",
":generated_components-SINGLE_COMPONENT_WITH_COLOR_PROP",
":generated_components-SINGLE_COMPONENT_WITH_ENUM_PROP",
":generated_components-SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS",
":generated_components-SINGLE_COMPONENT_WITH_EVENT_PROPS",
":generated_components-SINGLE_COMPONENT_WITH_FLOAT_PROPS",
":generated_components-SINGLE_COMPONENT_WITH_INTEGER_PROPS",
":generated_components-SINGLE_COMPONENT_WITH_STRING_PROP",
":generated_components-BOOLEAN_PROP",
":generated_components-COLOR_PROP",
":generated_components-ENUM_PROP",
":generated_components-EVENT_NESTED_OBJECT_PROPS",
":generated_components-EVENT_PROPS",
":generated_components-FLOAT_PROPS",
":generated_components-INTEGER_PROPS",
":generated_components-STRING_PROP",
":generated_components-TWO_COMPONENTS_DIFFERENT_FILES",
":generated_components-TWO_COMPONENTS_SAME_FILE",
],
@@ -131,14 +131,14 @@ rn_xplat_cxx_library(
"PUBLIC",
],
deps = [
":generated_components-SINGLE_COMPONENT_WITH_BOOLEAN_PROP",
":generated_components-SINGLE_COMPONENT_WITH_COLOR_PROP",
":generated_components-SINGLE_COMPONENT_WITH_ENUM_PROP",
":generated_components-SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS",
":generated_components-SINGLE_COMPONENT_WITH_EVENT_PROPS",
":generated_components-SINGLE_COMPONENT_WITH_FLOAT_PROPS",
":generated_components-SINGLE_COMPONENT_WITH_INTEGER_PROPS",
":generated_components-SINGLE_COMPONENT_WITH_STRING_PROP",
":generated_components-BOOLEAN_PROP",
":generated_components-COLOR_PROP",
":generated_components-ENUM_PROP",
":generated_components-EVENT_NESTED_OBJECT_PROPS",
":generated_components-EVENT_PROPS",
":generated_components-FLOAT_PROPS",
":generated_components-INTEGER_PROPS",
":generated_components-STRING_PROP",
":generated_components-TWO_COMPONENTS_DIFFERENT_FILES",
":generated_components-TWO_COMPONENTS_SAME_FILE",
],

View File

@@ -1,11 +1,11 @@
#import <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_STRING_PROP/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/ComponentDescriptors.h>
#import <react/components/BOOLEAN_PROP/ComponentDescriptors.h>
#import <react/components/STRING_PROP/ComponentDescriptors.h>
#import <react/components/INTEGER_PROPS/ComponentDescriptors.h>
#import <react/components/FLOAT_PROPS/ComponentDescriptors.h>
#import <react/components/COLOR_PROP/ComponentDescriptors.h>
#import <react/components/ENUM_PROP/ComponentDescriptors.h>
#import <react/components/EVENT_NESTED_OBJECT_PROPS/ComponentDescriptors.h>
#import <react/components/EVENT_PROPS/ComponentDescriptors.h>
#import <react/components/TWO_COMPONENTS_SAME_FILE/ComponentDescriptors.h>
#import <react/components/TWO_COMPONENTS_DIFFERENT_FILES/ComponentDescriptors.h>

View File

@@ -12,7 +12,7 @@
import type {SchemaType} from '../../CodegenSchema.js';
const SINGLE_COMPONENT_WITH_BOOLEAN_PROP: SchemaType = {
const BOOLEAN_PROP: SchemaType = {
modules: {
Switch: {
components: {
@@ -40,7 +40,7 @@ const SINGLE_COMPONENT_WITH_BOOLEAN_PROP: SchemaType = {
},
};
const SINGLE_COMPONENT_WITH_STRING_PROP: SchemaType = {
const STRING_PROP: SchemaType = {
modules: {
Switch: {
components: {
@@ -68,7 +68,7 @@ const SINGLE_COMPONENT_WITH_STRING_PROP: SchemaType = {
},
};
const SINGLE_COMPONENT_WITH_INTEGER_PROPS: SchemaType = {
const INTEGER_PROPS: SchemaType = {
modules: {
Switch: {
components: {
@@ -112,7 +112,7 @@ const SINGLE_COMPONENT_WITH_INTEGER_PROPS: SchemaType = {
},
};
const SINGLE_COMPONENT_WITH_FLOAT_PROPS: SchemaType = {
const FLOAT_PROPS: SchemaType = {
modules: {
Switch: {
components: {
@@ -172,7 +172,7 @@ const SINGLE_COMPONENT_WITH_FLOAT_PROPS: SchemaType = {
},
};
const SINGLE_COMPONENT_WITH_COLOR_PROP: SchemaType = {
const COLOR_PROP: SchemaType = {
modules: {
Switch: {
components: {
@@ -200,7 +200,7 @@ const SINGLE_COMPONENT_WITH_COLOR_PROP: SchemaType = {
},
};
const SINGLE_COMPONENT_WITH_ENUM_PROP: SchemaType = {
const ENUM_PROP: SchemaType = {
modules: {
Switch: {
components: {
@@ -239,7 +239,7 @@ const SINGLE_COMPONENT_WITH_ENUM_PROP: SchemaType = {
},
};
const SINGLE_COMPONENT_WITH_EVENT_PROPS: SchemaType = {
const EVENT_PROPS: SchemaType = {
modules: {
Switch: {
components: {
@@ -336,7 +336,7 @@ const SINGLE_COMPONENT_WITH_EVENT_PROPS: SchemaType = {
},
};
const SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS: SchemaType = {
const EVENT_NESTED_OBJECT_PROPS: SchemaType = {
modules: {
Switch: {
components: {
@@ -508,14 +508,14 @@ const TWO_COMPONENTS_DIFFERENT_FILES: SchemaType = {
};
module.exports = {
SINGLE_COMPONENT_WITH_BOOLEAN_PROP,
SINGLE_COMPONENT_WITH_STRING_PROP,
SINGLE_COMPONENT_WITH_INTEGER_PROPS,
SINGLE_COMPONENT_WITH_FLOAT_PROPS,
SINGLE_COMPONENT_WITH_COLOR_PROP,
SINGLE_COMPONENT_WITH_ENUM_PROP,
SINGLE_COMPONENT_WITH_EVENT_PROPS,
SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS,
BOOLEAN_PROP,
STRING_PROP,
INTEGER_PROPS,
FLOAT_PROPS,
COLOR_PROP,
ENUM_PROP,
EVENT_PROPS,
EVENT_NESTED_OBJECT_PROPS,
TWO_COMPONENTS_SAME_FILE,
TWO_COMPONENTS_DIFFERENT_FILES,
};

View File

@@ -14,79 +14,46 @@
const generator = require('../GenerateComponentDescriptorH.js');
const {
SINGLE_COMPONENT_WITH_BOOLEAN_PROP,
SINGLE_COMPONENT_WITH_STRING_PROP,
SINGLE_COMPONENT_WITH_INTEGER_PROPS,
SINGLE_COMPONENT_WITH_FLOAT_PROPS,
SINGLE_COMPONENT_WITH_COLOR_PROP,
SINGLE_COMPONENT_WITH_ENUM_PROP,
SINGLE_COMPONENT_WITH_EVENT_PROPS,
BOOLEAN_PROP,
STRING_PROP,
INTEGER_PROPS,
FLOAT_PROPS,
COLOR_PROP,
ENUM_PROP,
EVENT_PROPS,
TWO_COMPONENTS_SAME_FILE,
TWO_COMPONENTS_DIFFERENT_FILES,
} = require('../__test_fixtures__/fixtures.js');
describe('GenerateComponentDescriptorH', () => {
it('can generate a single boolean prop', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_BOOLEAN_PROP',
SINGLE_COMPONENT_WITH_BOOLEAN_PROP,
),
).toMatchSnapshot();
expect(generator.generate('BOOLEAN_PROP', BOOLEAN_PROP)).toMatchSnapshot();
});
it('can generate a single string prop', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_STRING_PROPS',
SINGLE_COMPONENT_WITH_STRING_PROP,
),
).toMatchSnapshot();
expect(generator.generate('STRING_PROPS', STRING_PROP)).toMatchSnapshot();
});
it('can generate integer props', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_INTEGER_PROPS',
SINGLE_COMPONENT_WITH_INTEGER_PROPS,
),
generator.generate('INTEGER_PROPS', INTEGER_PROPS),
).toMatchSnapshot();
});
it('can generate float props', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_FLOAT_PROPS',
SINGLE_COMPONENT_WITH_FLOAT_PROPS,
),
).toMatchSnapshot();
expect(generator.generate('FLOAT_PROPS', FLOAT_PROPS)).toMatchSnapshot();
});
it('can generate a single native primitive prop', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_COLOR_PROP',
SINGLE_COMPONENT_WITH_COLOR_PROP,
),
).toMatchSnapshot();
expect(generator.generate('COLOR_PROP', COLOR_PROP)).toMatchSnapshot();
});
it('can generate enum props', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_ENUM_PROP',
SINGLE_COMPONENT_WITH_ENUM_PROP,
),
).toMatchSnapshot();
expect(generator.generate('ENUM_PROP', ENUM_PROP)).toMatchSnapshot();
});
it('can generate events', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_EVENT_PROPS',
SINGLE_COMPONENT_WITH_EVENT_PROPS,
),
).toMatchSnapshot();
expect(generator.generate('EVENT_PROPS', EVENT_PROPS)).toMatchSnapshot();
});
it('supports two components from same module', () => {

View File

@@ -12,7 +12,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/ShadowNodes.h>
#include <react/components/BOOLEAN_PROP/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
@@ -38,7 +38,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/ShadowNodes.h>
#include <react/components/COLOR_PROP/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
@@ -64,7 +64,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_STRING_PROPS/ShadowNodes.h>
#include <react/components/STRING_PROPS/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
@@ -90,7 +90,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/ShadowNodes.h>
#include <react/components/ENUM_PROP/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
@@ -116,7 +116,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/ShadowNodes.h>
#include <react/components/EVENT_PROPS/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
@@ -142,7 +142,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/ShadowNodes.h>
#include <react/components/FLOAT_PROPS/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
@@ -168,7 +168,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/ShadowNodes.h>
#include <react/components/INTEGER_PROPS/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {

View File

@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
exports[`GenerateEventEmitterCpp can generate fixture BOOLEAN_PROP 1`] = `
Map {
"EventEmitters.cpp" => "
/**
@@ -10,7 +10,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/EventEmitters.h>
#include <react/components/BOOLEAN_PROP/EventEmitters.h>
namespace facebook {
namespace react {
@@ -23,7 +23,7 @@ namespace react {
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
exports[`GenerateEventEmitterCpp can generate fixture COLOR_PROP 1`] = `
Map {
"EventEmitters.cpp" => "
/**
@@ -33,7 +33,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/EventEmitters.h>
#include <react/components/COLOR_PROP/EventEmitters.h>
namespace facebook {
namespace react {
@@ -46,7 +46,7 @@ namespace react {
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
exports[`GenerateEventEmitterCpp can generate fixture ENUM_PROP 1`] = `
Map {
"EventEmitters.cpp" => "
/**
@@ -56,7 +56,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/EventEmitters.h>
#include <react/components/ENUM_PROP/EventEmitters.h>
namespace facebook {
namespace react {
@@ -69,7 +69,7 @@ namespace react {
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
exports[`GenerateEventEmitterCpp can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"EventEmitters.cpp" => "
/**
@@ -79,7 +79,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/EventEmitters.h>
#include <react/components/EVENT_NESTED_OBJECT_PROPS/EventEmitters.h>
namespace facebook {
namespace react {
@@ -110,7 +110,7 @@ location.setProperty(runtime, \\"y\\", event.location.y);
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
exports[`GenerateEventEmitterCpp can generate fixture EVENT_PROPS 1`] = `
Map {
"EventEmitters.cpp" => "
/**
@@ -120,7 +120,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/EventEmitters.h>
#include <react/components/EVENT_PROPS/EventEmitters.h>
namespace facebook {
namespace react {
@@ -149,7 +149,7 @@ void EventsNativeComponentEventEmitter::onEventDirect(EventsNativeComponentOnEve
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
exports[`GenerateEventEmitterCpp can generate fixture FLOAT_PROPS 1`] = `
Map {
"EventEmitters.cpp" => "
/**
@@ -159,7 +159,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/EventEmitters.h>
#include <react/components/FLOAT_PROPS/EventEmitters.h>
namespace facebook {
namespace react {
@@ -172,7 +172,7 @@ namespace react {
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
exports[`GenerateEventEmitterCpp can generate fixture INTEGER_PROPS 1`] = `
Map {
"EventEmitters.cpp" => "
/**
@@ -182,7 +182,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/EventEmitters.h>
#include <react/components/INTEGER_PROPS/EventEmitters.h>
namespace facebook {
namespace react {
@@ -195,7 +195,7 @@ namespace react {
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
exports[`GenerateEventEmitterCpp can generate fixture STRING_PROP 1`] = `
Map {
"EventEmitters.cpp" => "
/**
@@ -205,7 +205,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_STRING_PROP/EventEmitters.h>
#include <react/components/STRING_PROP/EventEmitters.h>
namespace facebook {
namespace react {

View File

@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
exports[`GenerateEventEmitterH can generate fixture BOOLEAN_PROP 1`] = `
Map {
"EventEmitters.h" => "
/**
@@ -24,7 +24,7 @@ namespace react {
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
exports[`GenerateEventEmitterH can generate fixture COLOR_PROP 1`] = `
Map {
"EventEmitters.h" => "
/**
@@ -48,7 +48,7 @@ namespace react {
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
exports[`GenerateEventEmitterH can generate fixture ENUM_PROP 1`] = `
Map {
"EventEmitters.h" => "
/**
@@ -72,7 +72,7 @@ namespace react {
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
exports[`GenerateEventEmitterH can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"EventEmitters.h" => "
/**
@@ -115,7 +115,7 @@ class EventsNestedObjectNativeComponentEventEmitter : public ViewEventEmitter {
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
exports[`GenerateEventEmitterH can generate fixture EVENT_PROPS 1`] = `
Map {
"EventEmitters.h" => "
/**
@@ -157,7 +157,7 @@ void onEventDirect(EventsNativeComponentOnEventDirectStruct value) const;
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
exports[`GenerateEventEmitterH can generate fixture FLOAT_PROPS 1`] = `
Map {
"EventEmitters.h" => "
/**
@@ -181,7 +181,7 @@ namespace react {
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
exports[`GenerateEventEmitterH can generate fixture INTEGER_PROPS 1`] = `
Map {
"EventEmitters.h" => "
/**
@@ -205,7 +205,7 @@ namespace react {
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
exports[`GenerateEventEmitterH can generate fixture STRING_PROP 1`] = `
Map {
"EventEmitters.h" => "
/**

View File

@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
exports[`GeneratePropsCpp can generate fixture BOOLEAN_PROP 1`] = `
Map {
"Props.cpp" => "
/**
@@ -10,7 +10,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/Props.h>
#include <react/components/BOOLEAN_PROP/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
@@ -29,7 +29,7 @@ BooleanPropNativeComponentProps::BooleanPropNativeComponentProps(
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
exports[`GeneratePropsCpp can generate fixture COLOR_PROP 1`] = `
Map {
"Props.cpp" => "
/**
@@ -39,7 +39,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/Props.h>
#include <react/components/COLOR_PROP/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
@@ -58,7 +58,7 @@ ColorPropNativeComponentProps::ColorPropNativeComponentProps(
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
exports[`GeneratePropsCpp can generate fixture ENUM_PROP 1`] = `
Map {
"Props.cpp" => "
/**
@@ -68,7 +68,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/Props.h>
#include <react/components/ENUM_PROP/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
@@ -87,7 +87,7 @@ EnumPropsNativeComponentProps::EnumPropsNativeComponentProps(
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
exports[`GeneratePropsCpp can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"Props.cpp" => "
/**
@@ -97,7 +97,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/Props.h>
#include <react/components/EVENT_NESTED_OBJECT_PROPS/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
@@ -116,7 +116,7 @@ EventsNestedObjectNativeComponentProps::EventsNestedObjectNativeComponentProps(
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
exports[`GeneratePropsCpp can generate fixture EVENT_PROPS 1`] = `
Map {
"Props.cpp" => "
/**
@@ -126,7 +126,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/Props.h>
#include <react/components/EVENT_PROPS/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
@@ -145,7 +145,7 @@ EventsNativeComponentProps::EventsNativeComponentProps(
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
exports[`GeneratePropsCpp can generate fixture FLOAT_PROPS 1`] = `
Map {
"Props.cpp" => "
/**
@@ -155,7 +155,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/Props.h>
#include <react/components/FLOAT_PROPS/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
@@ -178,7 +178,7 @@ blurRadius5(convertRawProp(rawProps, \\"blurRadius5\\", sourceProps.blurRadius5,
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
exports[`GeneratePropsCpp can generate fixture INTEGER_PROPS 1`] = `
Map {
"Props.cpp" => "
/**
@@ -188,7 +188,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/Props.h>
#include <react/components/INTEGER_PROPS/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
@@ -209,7 +209,7 @@ progress3(convertRawProp(rawProps, \\"progress3\\", sourceProps.progress3, progr
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
exports[`GeneratePropsCpp can generate fixture STRING_PROP 1`] = `
Map {
"Props.cpp" => "
/**
@@ -219,7 +219,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_STRING_PROP/Props.h>
#include <react/components/STRING_PROP/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {

View File

@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
exports[`GeneratePropsH can generate fixture BOOLEAN_PROP 1`] = `
Map {
"Props.h" => "
/**
@@ -31,7 +31,7 @@ class BooleanPropNativeComponentProps final : public ViewProps {
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
exports[`GeneratePropsH can generate fixture COLOR_PROP 1`] = `
Map {
"Props.h" => "
/**
@@ -63,7 +63,7 @@ class ColorPropNativeComponentProps final : public ViewProps {
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
exports[`GeneratePropsH can generate fixture ENUM_PROP 1`] = `
Map {
"Props.h" => "
/**
@@ -112,7 +112,7 @@ class EnumPropsNativeComponentProps final : public ViewProps {
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
exports[`GeneratePropsH can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"Props.h" => "
/**
@@ -143,7 +143,7 @@ class EventsNestedObjectNativeComponentProps final : public ViewProps {
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
exports[`GeneratePropsH can generate fixture EVENT_PROPS 1`] = `
Map {
"Props.h" => "
/**
@@ -174,7 +174,7 @@ class EventsNativeComponentProps final : public ViewProps {
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
exports[`GeneratePropsH can generate fixture FLOAT_PROPS 1`] = `
Map {
"Props.h" => "
/**
@@ -209,7 +209,7 @@ const Float blurRadius5{1.0};
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
exports[`GeneratePropsH can generate fixture INTEGER_PROPS 1`] = `
Map {
"Props.h" => "
/**
@@ -242,7 +242,7 @@ const int progress3{10};
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
exports[`GeneratePropsH can generate fixture STRING_PROP 1`] = `
Map {
"Props.h" => "
/**

View File

@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
exports[`GenerateShadowNodeCpp can generate fixture BOOLEAN_PROP 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
@@ -10,7 +10,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/ShadowNodes.h>
#include <react/components/BOOLEAN_PROP/ShadowNodes.h>
namespace facebook {
namespace react {
@@ -23,7 +23,7 @@ extern const char BooleanPropNativeComponentComponentName[] = \\"BooleanPropNati
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
exports[`GenerateShadowNodeCpp can generate fixture COLOR_PROP 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
@@ -33,7 +33,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/ShadowNodes.h>
#include <react/components/COLOR_PROP/ShadowNodes.h>
namespace facebook {
namespace react {
@@ -46,7 +46,7 @@ extern const char ColorPropNativeComponentComponentName[] = \\"ColorPropNativeCo
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
exports[`GenerateShadowNodeCpp can generate fixture ENUM_PROP 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
@@ -56,7 +56,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/ShadowNodes.h>
#include <react/components/ENUM_PROP/ShadowNodes.h>
namespace facebook {
namespace react {
@@ -69,7 +69,7 @@ extern const char EnumPropsNativeComponentComponentName[] = \\"EnumPropsNativeCo
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
exports[`GenerateShadowNodeCpp can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
@@ -79,7 +79,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/ShadowNodes.h>
#include <react/components/EVENT_NESTED_OBJECT_PROPS/ShadowNodes.h>
namespace facebook {
namespace react {
@@ -92,7 +92,7 @@ extern const char EventsNestedObjectNativeComponentComponentName[] = \\"EventsNe
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
exports[`GenerateShadowNodeCpp can generate fixture EVENT_PROPS 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
@@ -102,7 +102,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/ShadowNodes.h>
#include <react/components/EVENT_PROPS/ShadowNodes.h>
namespace facebook {
namespace react {
@@ -115,7 +115,7 @@ extern const char EventsNativeComponentComponentName[] = \\"EventsNativeComponen
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
exports[`GenerateShadowNodeCpp can generate fixture FLOAT_PROPS 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
@@ -125,7 +125,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/ShadowNodes.h>
#include <react/components/FLOAT_PROPS/ShadowNodes.h>
namespace facebook {
namespace react {
@@ -138,7 +138,7 @@ extern const char FloatPropNativeComponentComponentName[] = \\"FloatPropNativeCo
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
exports[`GenerateShadowNodeCpp can generate fixture INTEGER_PROPS 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
@@ -148,7 +148,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/ShadowNodes.h>
#include <react/components/INTEGER_PROPS/ShadowNodes.h>
namespace facebook {
namespace react {
@@ -161,7 +161,7 @@ extern const char IntegerPropNativeComponentComponentName[] = \\"IntegerPropNati
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
exports[`GenerateShadowNodeCpp can generate fixture STRING_PROP 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
@@ -171,7 +171,7 @@ Map {
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_STRING_PROP/ShadowNodes.h>
#include <react/components/STRING_PROP/ShadowNodes.h>
namespace facebook {
namespace react {

View File

@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
exports[`GenerateShadowNodeH can generate fixture BOOLEAN_PROP 1`] = `
Map {
"ShadowNodes.h" => "
/**
@@ -12,7 +12,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/Props.h>
#include <react/components/BOOLEAN_PROP/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
@@ -33,7 +33,7 @@ using BooleanPropNativeComponentShadowNode = ConcreteViewShadowNode<
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
exports[`GenerateShadowNodeH can generate fixture COLOR_PROP 1`] = `
Map {
"ShadowNodes.h" => "
/**
@@ -45,7 +45,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/Props.h>
#include <react/components/COLOR_PROP/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
@@ -66,7 +66,7 @@ using ColorPropNativeComponentShadowNode = ConcreteViewShadowNode<
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
exports[`GenerateShadowNodeH can generate fixture ENUM_PROP 1`] = `
Map {
"ShadowNodes.h" => "
/**
@@ -78,7 +78,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/Props.h>
#include <react/components/ENUM_PROP/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
@@ -99,7 +99,7 @@ using EnumPropsNativeComponentShadowNode = ConcreteViewShadowNode<
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
exports[`GenerateShadowNodeH can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"ShadowNodes.h" => "
/**
@@ -111,8 +111,8 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/EventEmitters.h>
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/Props.h>
#include <react/components/EVENT_NESTED_OBJECT_PROPS/EventEmitters.h>
#include <react/components/EVENT_NESTED_OBJECT_PROPS/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
@@ -134,7 +134,7 @@ EventsNestedObjectNativeComponentEventEmitter>;
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
exports[`GenerateShadowNodeH can generate fixture EVENT_PROPS 1`] = `
Map {
"ShadowNodes.h" => "
/**
@@ -146,8 +146,8 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/EventEmitters.h>
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/Props.h>
#include <react/components/EVENT_PROPS/EventEmitters.h>
#include <react/components/EVENT_PROPS/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
@@ -169,7 +169,7 @@ EventsNativeComponentEventEmitter>;
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
exports[`GenerateShadowNodeH can generate fixture FLOAT_PROPS 1`] = `
Map {
"ShadowNodes.h" => "
/**
@@ -181,7 +181,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/Props.h>
#include <react/components/FLOAT_PROPS/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
@@ -202,7 +202,7 @@ using FloatPropNativeComponentShadowNode = ConcreteViewShadowNode<
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
exports[`GenerateShadowNodeH can generate fixture INTEGER_PROPS 1`] = `
Map {
"ShadowNodes.h" => "
/**
@@ -214,7 +214,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/Props.h>
#include <react/components/INTEGER_PROPS/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
@@ -235,7 +235,7 @@ using IntegerPropNativeComponentShadowNode = ConcreteViewShadowNode<
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
exports[`GenerateShadowNodeH can generate fixture STRING_PROP 1`] = `
Map {
"ShadowNodes.h" => "
/**
@@ -247,7 +247,7 @@ Map {
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_STRING_PROP/Props.h>
#include <react/components/STRING_PROP/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {

View File

@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
exports[`GenerateViewConfigJs can generate fixture BOOLEAN_PROP 1`] = `
Map {
"ViewConfigs.js" => "
/**
@@ -35,7 +35,7 @@ ReactNativeViewConfigRegistry.register(
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
exports[`GenerateViewConfigJs can generate fixture COLOR_PROP 1`] = `
Map {
"ViewConfigs.js" => "
/**
@@ -70,7 +70,7 @@ ReactNativeViewConfigRegistry.register(
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
exports[`GenerateViewConfigJs can generate fixture ENUM_PROP 1`] = `
Map {
"ViewConfigs.js" => "
/**
@@ -105,7 +105,7 @@ ReactNativeViewConfigRegistry.register(
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
exports[`GenerateViewConfigJs can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"ViewConfigs.js" => "
/**
@@ -149,7 +149,7 @@ ReactNativeViewConfigRegistry.register(
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
exports[`GenerateViewConfigJs can generate fixture EVENT_PROPS 1`] = `
Map {
"ViewConfigs.js" => "
/**
@@ -199,7 +199,7 @@ ReactNativeViewConfigRegistry.register(
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
exports[`GenerateViewConfigJs can generate fixture FLOAT_PROPS 1`] = `
Map {
"ViewConfigs.js" => "
/**
@@ -238,7 +238,7 @@ ReactNativeViewConfigRegistry.register(
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
exports[`GenerateViewConfigJs can generate fixture INTEGER_PROPS 1`] = `
Map {
"ViewConfigs.js" => "
/**
@@ -275,7 +275,7 @@ ReactNativeViewConfigRegistry.register(
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
exports[`GenerateViewConfigJs can generate fixture STRING_PROP 1`] = `
Map {
"ViewConfigs.js" => "
/**