Skip to content

Conversation

@krixkrix
Copy link

Fixing all unit tests except the "XMLDocument" domain.

Before fixes:
Success rate 75% (69 of 91)

After fixes:

  • Fixed SignalSlot tests
  • Fixed AccessControl tests

Success rate 86% (83 of 96)

===

Original test output:

$ ./amc_unittest 
----------------------------------------------------------------------------------
Autodesk Machine Control Unit Testing Framework
----------------------------------------------------------------------------------
Using core git hash f7c73db6...
   1 | XMLDocument            | ChangeNamespacePrefix               [ SUCCESS ]
   2 | XMLDocument            | CreateEmptyDocument                 [ SUCCESS ]
   3 | XMLDocument            | DuplicateNamespacePrefixShouldThr   [ SUCCESS ]
       Condition was not true (Exception must be thrown for inval   [ ERROR   ] 
   4 | XMLDocument            | InvalidNamespaceShouldThrow         [ FAILURE ]
   5 | XMLDocument            | ParseInvalidXMLShouldThrow          [ SUCCESS ]
   6 | XMLDocument            | ParseValidXML                       [ SUCCESS ]
   7 | XMLDocument            | RegisterAndFindNamespace            [ SUCCESS ]
   8 | XMLDocument            | SaveAndReloadXML                    [ SUCCESS ]
   9 | XMLDocumentNode        | AddAndFindAttribute                 [ SUCCESS ]
  10 | XMLDocumentNode        | AddAndFindChildNode                 [ SUCCESS ]
  11 | XMLDocumentNode        | AddAndRemoveAttribute               [ SUCCESS ]
       XML Node has text content                                    [ ERROR   ] 
  12 | XMLDocumentNode        | AddChildFailsWithTextContent        [ FAILURE ]
  13 | XMLDocumentNode        | AddDuplicateChildShouldNotThrow     [ SUCCESS ]
  14 | XMLDocumentNode        | ChildCountTracking                  [ SUCCESS ]
       Condition was not false                                      [ ERROR   ] 
  15 | XMLDocumentNode        | ChildMapIntegrityAfterRemovals      [ FAILURE ]
       Could not find XML Namespace: http://wrong.com (478) (478)   [ ERROR   ] 
  16 | XMLDocumentNode        | CompareNameLogic                    [ FAILURE ]
       XML Node has children                                        [ ERROR   ] 
  17 | XMLDocumentNode        | CopyDeepNode                        [ FAILURE ]
  18 | XMLDocumentNode        | CopyNodeContent                     [ SUCCESS ]
  19 | XMLDocumentNode        | CountChildrenByName                 [ SUCCESS ]
       Condition was not true (Copying nodes between documents sh   [ ERROR   ] 
  20 | XMLDocumentNode        | CrossDocumentCopyShouldThrow        [ FAILURE ]
       Duplicate attribute.: id (472) (472)                         [ ERROR   ] 
  21 | XMLDocumentNode        | DuplicateAttributeShouldFail        [ FAILURE ]
  22 | XMLDocumentNode        | GetPrefixedNameNoPrefix             [ SUCCESS ]
       Invalid attribute index.: 0 (467) (467)                      [ ERROR   ] 
  23 | XMLDocumentNode        | InvalidAttributeIndex               [ FAILURE ]
  24 | XMLDocumentNode        | InvalidParamShouldThrow             [ SUCCESS ]
  25 | XMLDocumentNode        | NamespacePrefixConflictShouldThro   [ SUCCESS ]
       Condition was not true                                       [ ERROR   ] 
  26 | XMLDocumentNode        | PrefixedNodeAndAttributeNames       [ FAILURE ]
  27 | XMLDocumentNode        | RemoveAttributeAfterCopy            [ SUCCESS ]
  28 | XMLDocumentNode        | RemoveAttributeByIndex              [ SUCCESS ]
       Condition was not false                                      [ ERROR   ] 
  29 | XMLDocumentNode        | RemoveChildPointer                  [ FAILURE ]
  30 | XMLDocumentNode        | RemoveChildrenByName                [ SUCCESS ]
  31 | XMLDocumentNode        | RemoveNonexistentAttribute          [ SUCCESS ]
       XML Node has children                                        [ ERROR   ] 
  32 | XMLDocumentNode        | SetTextContentFailWithChildren      [ FAILURE ]
  33 | XMLDocumentNode        | SetTextContentSuccess               [ SUCCESS ]
  34 | XMLDocumentNode        | SplitNamespaceName                  [ SUCCESS ]
  35 | XMLDocumentNode        | StoreToPugiXML                      [ SUCCESS ]
  36 | XMLDocumentNode        | TextContentClearsChildrenShouldFa   [ SUCCESS ]
  37 | XMLDocumentAttribute   | AttributeBoundToCorrectNode         [ SUCCESS ]
  38 | XMLDocumentAttribute   | AttributeNameCaseSensitive          [ SUCCESS ]
       could not parse XML String.                                  [ ERROR   ] 
  39 | XMLDocumentAttribute   | AttributeSerializationRoundtrip     [ FAILURE ]
  40 | XMLDocumentAttribute   | CreateAndRetrieveAttribute          [ SUCCESS ]
  41 | XMLDocumentAttribute   | EmptyValueIsAccepted                [ SUCCESS ]
  42 | XMLDocumentAttribute   | FuzzedAttributeValues               [ SUCCESS ]
  43 | XMLDocumentAttribute   | InvalidNamespaceShouldThrow         [ SUCCESS ]
  44 | XMLDocumentAttribute   | LongAttributeValue                  [ SUCCESS ]
  45 | XMLDocumentAttribute   | PrefixedNameDifferentNamespace      [ SUCCESS ]
       XML namespace already registered.: http://example.com (462   [ ERROR   ] 
  46 | XMLDocumentAttribute   | PrefixedNameSameNamespace           [ FAILURE ]
  47 | XMLDocumentAttribute   | SetAndGetValue                      [ SUCCESS ]
  48 | XMLDocumentAttribute   | SpecialCharacterValue               [ SUCCESS ]
  49 | XMLDocumentNamespace   | ChangePrefixToEmpty                 [ SUCCESS ]
  50 | XMLDocumentNamespace   | CheckXMLNameValidationNegative      [ SUCCESS ]
  51 | XMLDocumentNamespace   | CreateNamespaceAndReadBack          [ SUCCESS ]
  52 | XMLDocumentNamespace   | CreateWithEmptyNamespace            [ SUCCESS ]
  53 | XMLDocumentNamespace   | CreateWithLongPrefixAndNamespace    [ SUCCESS ]
  54 | XMLDocumentNamespace   | EqualityCheckByPointer              [ SUCCESS ]
  55 | XMLDocumentNamespace   | HasPrefixDetection                  [ SUCCESS ]
  56 | XMLDocumentNamespace   | IntegrationWithNodePrefixedAttrib   [ SUCCESS ]
  57 | XMLDocumentNamespace   | MultiplePrefixChanges               [ SUCCESS ]
  58 | XMLDocumentNamespace   | PrefixIsNotCopiedByReference        [ SUCCESS ]
  59 | XMLDocumentNamespace   | PrefixMutation                      [ SUCCESS ]
  60 | XMLDocumentNamespace   | SamePrefixDifferentNamespace        [ SUCCESS ]
  61 | XMLDocumentNamespace   | StaticChecksReturnTrue              [ SUCCESS ]
  62 | AccessControl          | AddAndFindRole                      [ SUCCESS ]
       Invalid access permission identifier: perm.read (518) (518   [ ERROR   ] 
  63 | AccessControl          | AddDuplicatePermissionFails         [ FAILURE ]
  64 | AccessControl          | AddDuplicateRoleFails               [ SUCCESS ]
       Invalid access permission identifier: perm.read (518) (518   [ ERROR   ] 
  65 | AccessControl          | AddPermission                       [ FAILURE ]
       Invalid access permission identifier: perm.test (518) (518   [ ERROR   ] 
  66 | AccessControl          | CheckPermissionInRole               [ FAILURE ]
  67 | AccessControl          | DefaultRoleNotSetThrows             [ SUCCESS ]
       Invalid access permission identifier: perm.view (518) (518   [ ERROR   ] 
  68 | AccessControl          | EmptyIdentifierThrows               [ FAILURE ]
  69 | AccessControl          | PermissionNotFoundThrows            [ SUCCESS ]
  70 | AccessControl          | SetDefaultRole                      [ SUCCESS ]
  71 | AccessControl          | SetToNoAccessControl                [ SUCCESS ]
  72 | AccessRole             | AddNullPermissionThrows             [ SUCCESS ]
  73 | AccessRole             | AddPermissionToRole                 [ SUCCESS ]
  74 | AccessRole             | CreateInvalidRoleThrows             [ SUCCESS ]
  75 | AccessRole             | CreateValidRole                     [ SUCCESS ]
  76 | AccessRole             | DuplicatePermissionThrows           [ SUCCESS ]
  77 | AccessRole             | GetPermissionsList                  [ SUCCESS ]
  78 | AccessRole             | RemovePermission                    [ SUCCESS ]
  79 | AccessPermission       | AccessorsReturnExpectedValues       [ SUCCESS ]
  80 | AccessPermission       | CreateValidPermission               [ SUCCESS ]
  81 | AccessPermission       | EmptyIdentifierThrows               [ SUCCESS ]
  82 | AccessPermission       | InvalidIdentifierThrows             [ SUCCESS ]
  83 | SignalSlot             | AddSignalToQueue                    [ SUCCESS ]
       invalid uuid string one                                      [ ERROR   ] 
  84 | SignalSlot             | ClearQueueWorks                     [ FAILURE ]
  85 | SignalSlot             | CreateSignalSlotBasic               [ SUCCESS ]
       invalid uuid string testuuid                                 [ ERROR   ] 
  86 | SignalSlot             | ParameterResultAccess               [ FAILURE ]
       invalid uuid string uuid-a                                   [ ERROR   ] 
  87 | SignalSlot             | PeekQueue                           [ FAILURE ]
       invalid uuid string uuid1                                    [ ERROR   ] 
  88 | SignalSlot             | QueueOverflow                       [ FAILURE ]
  89 | SignalSlot             | SignalFailureTransition             [ SUCCESS ]
  90 | SignalSlot             | SignalPhaseTransition               [ SUCCESS ]
       invalid uuid string overflow-0                               [ ERROR   ] 
  91 | SignalSlot             | TimeoutAndOverflowTest              [ FAILURE ]
Success rate 75% (69 of 91)

alexanderoster and others added 24 commits October 9, 2025 16:52
…factor processing (alexanderoster#37)

* LibMCCore: Refine hatch interpolation handling and improve nonlinear factor processing

- Core toolpath logic (amc_toolpathlayerdata.cpp):
  - Introduced compile-time switch `USEALLMODIFICATIONFACTORS` to control whether
    all modification factors (F/G/H) or only factor F are processed.
  - Added safeguard when assigning nonlinear interpolation data to avoid
    out-of-range vector access when `nSubInterpolationCount` is zero.

- ScanLabSMC driver (CSMCJobInstance):
  - Added parsing and output of new active channel data (`active0`, `active1`) in
    SMC v1.0 simulation files.
  - Updated CSV field mapping to include new channels, replacing placeholder
    unused entries.
  - Extended data table schema to add `active0` and `active1` columns.
  - Populated active channel values in the output table and reset corresponding
    vectors after use.

- LibMCEnv layer evaluation (libmcenv_toolpathlayer.cpp):
  - Commented out exception throw for incomplete hatch profile evaluation to
    allow partial evaluation without interrupting execution.

Signed-off-by: Yury Rodzikau <y.rodzikau@c1-technologies.com>

* LibMCCore: add laser power channel to scatter plot and implement datatable channel filling

- Renamed simulation column `active0` to `power` to reflect actual laser power semantics
  in SMC v1.1 job data output.
- Updated simulation data export to write laser power values into the new `power` column.
- Implemented `fillScatterplotChannel` in `libmcenv_datatable.cpp`:

* LibMCCore/WebClient: add laser power visualization mode and power data display in point inspector

- Added a new "powerramp" color mode in LayerView for visualizing laser power
  distribution across the toolpath.
- Implemented computeChannelColumnRange(...) to detect the min/max of a data
  column and normalize power values for coloring.
- Added makeLaserPowerColors() to convert normalized power values to HSL-based
  RGB gradient for visual representation.
- Extended point inspector to display per-point laser power.
- Updated data loading logic to correctly populate the "power" channel from
  backend stream data.
- Updated Vue integration to cycle `laseron → powerramp → uniform → time`
  when toggling color modes.

Signed-off-by: Yury Rodzikau <y.rodzikau@c1-technologies.com>

---------

Signed-off-by: Yury Rodzikau <y.rodzikau@c1-technologies.com>
@krixkrix krixkrix closed this Oct 31, 2025
@krixkrix krixkrix deleted the unittest_fixes branch October 31, 2025 10:55
@krixkrix krixkrix restored the unittest_fixes branch October 31, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants